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

play.d/common.sh: major clean up

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