remove old instal in usr/bin

This commit is contained in:
MatMoul 2022-10-16 00:40:34 +02:00
parent 3695e59bf9
commit 10bfdacbcf

11
archdi
View file

@ -42,14 +42,13 @@ install(){
echo "Install $apptitle ..." echo "Install $apptitle ..."
echo "" echo ""
chmod 755 $0 2>/dev/null chmod 755 $0 2>/dev/null
if [[ -f "/usr/bin/archdi" ]]; then mv $0 /usr/local/bin/archdi 2>/dev/null
mv $0 /usr/bin/archdi 2>/dev/null
else
mv $0 /usr/local/bin/archdi 2>/dev/null
fi
echo "" echo ""
echo "$apptitle is installed." echo "$apptitle is installed."
echo "type archdi to start." echo "type archdi to start."
if [[ -f "/usr/bin/archdi" ]]; then
rm /usr/bin/archdi 2>/dev/null
fi
} }
run(){ run(){
@ -158,7 +157,7 @@ dependencies(){
} }
chkupgrade(){ chkupgrade(){
if [ "$0" = "/usr/bin/archdi" ]; then if [[ "$0" = "/usr/local/bin/archdi" ]]; then
if [ ! "$version" = "$lastver" ]; then if [ ! "$version" = "$lastver" ]; then
if (whiptail --backtitle "$apptitle" --yesno "New version found !\n\nInstall last version ?" 0 0) then if (whiptail --backtitle "$apptitle" --yesno "New version found !\n\nInstall last version ?" 0 0) then
cd /tmp cd /tmp