Off-Topic > SCM EXtensions
scms locales are not automatically loaded
vinnie:
Yes :P
AbNoRMiS:
it seems that is not enough to have an idea
necessary to have a ready-to-use solution ;)
vinnie:
I think that scm should still be well digested by comunity,
I do not even frame well the situation, so I prefer to listen in silence ;)
AbNoRMiS:
if option useless then it will be documented
if option is useful then it will be improved :D
AbNoRMiS:
propose to consider and testing changes in the script /usr/bin/scm-load
to be able download, install and uninstall scm locale with primary scm
modified script attached
--- Quote ---mountpkg() {
if [ -f "$1".md5.txt ]; then
md5sum -c "$1".md5.txt >/dev/null
if [ "$?" != 0 ]; then
echo "Error on $EXTENSION"
abort
fi
fi
APP=`basename $1 .scm`
[ -d /apps/"$APP" ] || sudo mkdir -p /apps/"$APP"
sudo busybox mount "$1" /apps/"$APP" -t squashfs -o loop,ro,bs=4096
if [ "$?" == 0 ]; then
if [ "$LANG" != "C" ] && [ -f $APP-locale.scm ] && [ ! -d /apps/$APP-locale ]; then
if [ -f $APP-locale.scm.md5.txt ] && md5sum -c $APP-locale.scm.md5.txt >/dev/null; then
sudo mkdir -p /apps/$APP-locale
sudo busybox mount $APP-locale.scm /apps/$APP-locale -t squashfs -o loop,ro,bs=4096
else
echo "Error on $APP-locale.scm"
fi
fi
if [ "$(ls -A /apps/"$APP")" ]; then
if [ -x /apps/"$APP"/config/install ]; then
sudo /apps/"$APP"/config/install
fi
[ -d /usr/local/share/applications/ ] || sudo mkdir -p /usr/local/share/applications/
ls -A /apps/"$APP"/share/applications/*.desktop > /dev/null 2>&1 && \
sudo ln -s /apps/"$APP"/share/applications/*.desktop /usr/local/share/applications/ > /dev/null 2>&1
[ -d /usr/local/share/pixmaps/ ] || sudo mkdir -p /usr/local/share/pixmaps/
ls -A /apps/"$APP"/share/pixmaps/*.png > /dev/null 2>&1 && \
sudo ln -s /apps/"$APP"/share/pixmaps/*.png /usr/local/share/pixmaps/ > /dev/null 2>&1
if ls -A /apps/"$APP"/bin > /dev/null 2>&1 && ! grep "link_bin=no" /apps/"$APP"/config/spec > /dev/null 2>&1; then
sudo ln -s /apps/"$APP"/bin/* /apps/bin/ > /dev/null 2>&1
fi
if [ ! "$BOOTING" ]; then
desktop.sh "$APP"
[ $(which "$DESKTOP"_restart) ] && "$DESKTOP"_restart
[ -n "$ICONS" ] && "$ICONS".sh &
fi
fi
fi
}
--- End quote ---
--- Quote ---fetch_app(){
echo "0" > /tmp/appserr
[ -f "$1".dep ] && [ ! -f "$EXTENSION" ] && rm -f "$DEPLIST"
wget -cq "$MIRROR"/"$1".dep 2>/dev/null
wget -cq "$MIRROR"/"$1".md5.txt 2>/dev/null
wget -c "$MIRROR"/"$1"
md5sum -c "$1".md5.txt
if [ "$?" != 0 ]; then
echo "Error on $EXTENSION"
abort
fi
SCMLOCALE=${1%.scm}-locale.scm
if [ "$LANG" != "C" ] && [ ! -f $SCMLOCALE ] && wget --spider -q $MIRROR/$SCMLOCALE >/dev/null 2>&1; then
wget -cq $MIRROR/$SCMLOCALE.md5.txt 2>/dev/null
wget -c $MIRROR/$SCMLOCALE
md5sum -c $SCMLOCALE.md5.txt || echo "Error on $SCMLOCALE"
fi
}
--- End quote ---
--- Quote ---remove(){
FREEDESKTOPAPP=/usr/local/share/applications/"$APPNAME".desktop
MENUNAME="$(awk 'BEGIN{FS="="}{if ($1 == "Name") print $2}' "$FREEDESKTOPAPP")"
if [ "$LANG" != "C" ] && [ -d /apps/$APPNAME-locale ]; then
sudo umount -d /apps/$APPNAME-locale
sudo rmdir /apps/$APPNAME-locale
fi
# Remove menu item
read DESKTOP < /etc/sysconfig/desktop
[ $(which "$DESKTOP"_rmitem) ] && "$DESKTOP"_rmitem "$APPNAME"
[ $(which "$DESKTOP"_rmitem) ] && "$DESKTOP"_rmitem "$MENUNAME"
[ $(which "$DESKTOP"_restart) ] && "$DESKTOP"_restart
# Remove icon
if [ -n "$ICONS" ]; then
ICONSPEC="$(awk 'BEGIN{FS="="}{if ($1 == "X-FullPathIcon") print $2}' "$FREEDESKTOPAPP")"
[ -n "$ICONSPEC" ] && "$ICONS"_rm_icon "$MENUNAME" && "$ICONS".sh &
fi
for I in `find /apps/bin`; do
readlink "$I" | grep "/apps/$APPNAME/bin" > /dev/null 2>&1 && sudo rm "$I"
done
for I in `find /usr/local/share/applications`; do
readlink "$I" | grep "/apps/$APPNAME/share/applications" > /dev/null 2>&1 && sudo rm "$I"
done
for I in `find /usr/local/share/pixmaps`; do
readlink "$I" | grep "/apps/$APPNAME/share/pixmaps" > /dev/null 2>&1 && sudo rm "$I"
done
sudo umount -d /apps/"$APPNAME"
sudo rmdir /apps/"$APPNAME"
}
--- End quote ---
Removed attachment as it is against forum policy.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version