Commit 4a45569e authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-prescription: small fixes

parent f7bf1732
...@@ -31,7 +31,7 @@ __remove_installed_app() ...@@ -31,7 +31,7 @@ __remove_installed_app()
[ -d "$epm_vardir" ] || return 0 [ -d "$epm_vardir" ] || return 0
local i local i
for i in $* ; do for i in $* ; do
$SUDO sed -i '/^$i$/d' $epm_vardir/installed-app $SUDO sed -i "/^$i$/d" $epm_vardir/installed-app
done done
return 0 return 0
} }
...@@ -85,14 +85,15 @@ fi ...@@ -85,14 +85,15 @@ fi
if [ "$1" = "--remove" ] ; then if [ "$1" = "--remove" ] ; then
shift shift
echo "Installed::"
#__check_installed_app "$1" || fatal "$1 is not installed" #__check_installed_app "$1" || fatal "$1 is not installed"
__epm_prescription_run $1 --remove && __remove_installed_app "$@" __epm_prescription_run $1 --remove
__remove_installed_app "$@"
exit exit
fi fi
if [ "$1" = "--list" ] ; then if [ "$1" = "--list" ] || [ "$1" = "--installed" ] ; then
shift shift
echo "Installed:"
local i local i
for i in $(__list_installed_app) ; do for i in $(__list_installed_app) ; do
printf " %-20s - %s\n" "$i" "$($psdir/$i.sh --description 2>/dev/null)" printf " %-20s - %s\n" "$i" "$($psdir/$i.sh --description 2>/dev/null)"
...@@ -105,9 +106,11 @@ if [ "$1" == "--list-all" ] || [ -z "$*" ] ; then ...@@ -105,9 +106,11 @@ if [ "$1" == "--list-all" ] || [ -z "$*" ] ; then
for i in $psdir/*.sh ; do for i in $psdir/*.sh ; do
printf " %-20s - %s\n" "$(basename $i .sh)" "$($i --description 2>/dev/null)" printf " %-20s - %s\n" "$(basename $i .sh)" "$($i --description 2>/dev/null)"
done done
echo
echo "run epm play --list to list installed only or --remove to remove one"
exit exit
fi fi
__check_installed_app "$1" && info "$1 is already installed" && exit 1 __check_installed_app "$1" && info "$1 is already installed" && exit 1
__epm_prescription_run "$1" --run && __save_installed_app $1 __epm_prescription_run "$1" --run && __save_installed_app "$1"
} }
...@@ -97,7 +97,7 @@ __fix_spec() ...@@ -97,7 +97,7 @@ __fix_spec()
# drop forbidded paths # drop forbidded paths
# https://bugzilla.altlinux.org/show_bug.cgi?id=38842 # https://bugzilla.altlinux.org/show_bug.cgi?id=38842
for i in / /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/share /usr/share/doc /var /var/log /var/run \ for i in / /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/share /usr/share/doc /var /var/log /var/run \
/etc/cron.daily /usr/share/man /usr/share/man/man1 /usr/share/appdata /usr/share/applications /usr/share/menu ; do /etc/cron.daily /usr/share/icons /usr/share/pixmaps /usr/share/man /usr/share/man/man1 /usr/share/appdata /usr/share/applications /usr/share/menu ; do
sed -i -e "s|^%dir \"$i/*\"$||" \ sed -i -e "s|^%dir \"$i/*\"$||" \
-e "s|^\"$i/*\"$||" \ -e "s|^\"$i/*\"$||" \
-e "s|^$i/*$||" \ -e "s|^$i/*$||" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment