Closed YannMagnin closed 4 years ago
sudo sh install.sh --snapshot
is not very safe and common to be implement I think.install.sh
can overwrite, but need to make a flag (more practical) :
# Test if program already exist
if [ -f "$repo_name" ] || [ -d "$repo_name" ]
then
read -p "$repo_name already exist, overwrite? [y/N] " -n 1 -r
if [[ $REPLY =~ ^[YyOo]$ ]]
then
echo ''
rm -rf "$repo_name"
...
Now blih_cli install is provide by npm (cf: https://www.npmjs.com/package/blih_cli & https://github.com/GreenDjango/blih_cli/packages/348607)
I have created an AUR package for
blih_cli
: https://aur.archlinux.org/packages/blih_cli-gitBut I have some points to discuss with:
snapshot
version using theinstall.sh
(likesudo sh install.sh --snapshot
)?--uninstall
flag is involved is a good idea. I think that an external binary does not have to request that, it's the user to choose or not to authorize thesudo
on certain actions(?)I ask that because when the
blih_cli
is already installed, the AUR packages will automatically try to re-install the binary. And, during this process it's normally doesn't request the user's root password (because thefakeroot
environment is involved (but only if the AUR package use explicitlysudo
not when the binary invoke manually the root password)).If you don't want to remove this feature, can I use the
unistall.sh
to remove manually theblih_cli
before the reinstallation ? There are any flags for the script ?