Commit 8189fb8e authored by Vitaly Lipatov's avatar Vitaly Lipatov

prescriptions: add --remove support

parent 5bdce758
......@@ -25,7 +25,7 @@ local psdir="$CONFIGDIR/prescription.d"
if [ -z "$pkg_filenames" ] ; then
echo "Run with a name of a prescription to run:"
for i in $psdir/*.sh ; do
printf " %-20s - %s\n" "$(basename $i .sh)" "$($i --description)"
printf " %-20s - %s\n" "$(basename $i .sh)" "$($i --description 2>/dev/null)"
done
return
fi
......@@ -42,7 +42,7 @@ __set_EGET
export PATH=$PROGDIR:$PATH
info "Running $($script --description) ..."
info "Running $($script --description 2>/dev/null) ..."
docmd $script --run
}
......@@ -8,3 +8,6 @@ Allowed command:
TODO:
* inject some functions
TODO:
* save packages for remove
......@@ -7,6 +7,11 @@ fatal()
exit 1
}
if [ "$1" = "--remove" ] ; then
epm remove google-chrome-stable
exit
fi
[ "$1" != "--run" ] && echo "Install The popular and trusted web browser by Google (Stable Channel) from the official site" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
......
......@@ -7,6 +7,13 @@ fatal()
exit 1
}
PKGNAME=chromium-gost
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Chromium with GOST support from the official site" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
......@@ -16,6 +23,6 @@ fatal()
arch=amd64
pkgtype=deb
PKG=$($EGET --list --latest https://github.com/deemru/chromium-gost/releases "chromium-gost-*linux-$arch.$pkgtype") || fatal "Can't get package URL"
PKG=$($EGET --list --latest https://github.com/deemru/chromium-gost/releases "$PKGNAME-*linux-$arch.$pkgtype") || fatal "Can't get package URL"
epm install "$PKG"
......@@ -7,6 +7,13 @@ fatal()
exit 1
}
PKGNAME=microsoft-edge-dev
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Microsoft Edge browser (dev) from the official site" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
......
......@@ -7,6 +7,13 @@ fatal()
exit 1
}
PKGNAME=skypeforlinux
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Skype for Linux - Stable/Release Version from the official site" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
......
......@@ -7,6 +7,13 @@ fatal()
exit 1
}
PKGNAME=teams
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Microsoft Teams for Linux from the official site" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
......
......@@ -7,8 +7,6 @@ fatal()
exit 1
}
[ "$1" != "--run" ] && echo "Install Teamviewer from the official site" && exit
PKGNAME="teamviewer"
arch="$($DISTRVENDOR -a)"
......@@ -23,6 +21,13 @@ case "$arch" in
;;
esac
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Teamviewer from the official site" && exit
# See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=teamviewer
# epm uses eget to download * names
......
......@@ -7,6 +7,13 @@ fatal()
exit 1
}
PKGNAME=vivaldi-stable
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Vivaldi browser from the official site" && exit
arch="$($DISTRVENDOR --debian-arch)"
......@@ -26,4 +33,4 @@ esac
# https://repo.vivaldi.com/archive/rpm/x86_64/
# epm uses eget to download * names
epm --noscripts install "https://repo.vivaldi.com/archive/deb/pool/main/$(epm print constructname vivaldi-stable "*" $arch deb)"
epm --noscripts install "https://repo.vivaldi.com/archive/deb/pool/main/$(epm print constructname $PKGNAME "*" $arch deb)"
......@@ -7,6 +7,13 @@ fatal()
exit 1
}
PKGNAME=zoom
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Zoom client from the official site" && exit
arch=$($DISTRVENDOR --distro-arch)
......
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