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

play.d/common.sh: major clean up

parent 3801cd47
......@@ -6,33 +6,34 @@ fatal()
exit 1
}
if [ "$1" = "--remove" ] ; then
case "$1" in
"--remove")
epm remove $PKGNAME
exit
fi
if [ "$1" = "--package" ] ; then
;;
"--package")
echo "$PKGNAME"
exit
fi
if [ "$1" = "--installed" ] ; then
;;
"--installed")
epm installed $PKGNAME
exit
fi
if [ "$1" = "--description" ] ; then
;;
"--description")
echo "$DESCRIPTION"
exit
fi
[ "$1" != "--run" ] && [ "$1" != "--update" ] && fatal "Unknown command $1"
if [ "$1" = "--update" ] ; then
;;
"--update")
if ! epm installed $PKGNAME ; then
echo "Skipping update of $PKGNAME (package is not installed)"
exit
fi
fi
;;
"--run")
# just pass
;;
*)
fatal "Unknown command $1"
;;
esac
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