mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-01-10 14:16:50 +00:00
use escape codes instead of tput to drop ncurses dependency
This commit is contained in:
parent
c09f7ea933
commit
f87a42698e
16
appdwarf
16
appdwarf
|
@ -87,8 +87,12 @@ case "$1" in
|
||||||
-p | -z | --prefix | --zzexe )
|
-p | -z | --prefix | --zzexe )
|
||||||
zzexe "$@" ;;
|
zzexe "$@" ;;
|
||||||
--version | -v )
|
--version | -v )
|
||||||
tput setaf 2; echo appdwarf 2023.11.16
|
printf '\e[32m'
|
||||||
tput setaf 6; echo Built by July 🏳️🌈; exit ;;
|
echo 'appdwarf 2023.11.16'
|
||||||
|
printf '\e[36m'
|
||||||
|
echo Built by July 🏳️🌈
|
||||||
|
printf '\e[0m'
|
||||||
|
exit ;;
|
||||||
-* | '' )
|
-* | '' )
|
||||||
echo "Usage: appdwarf [option] [APP/FILE/FOLDER/URL] [compression options]"
|
echo "Usage: appdwarf [option] [APP/FILE/FOLDER/URL] [compression options]"
|
||||||
echo " -a [FILE] write example AppRun file"
|
echo " -a [FILE] write example AppRun file"
|
||||||
|
@ -133,7 +137,9 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
|
||||||
set -- "$app" "$@"
|
set -- "$app" "$@"
|
||||||
test "$FETCH" && chmod +x "$1" && exit
|
test "$FETCH" && chmod +x "$1" && exit
|
||||||
else
|
else
|
||||||
tput setaf 1; echo "No valid remote or local input found. Exiting..." >&2
|
printf '\e[31m' >&2
|
||||||
|
echo "No valid remote or local input found. Exiting..." >&2
|
||||||
|
printf '\e[0m' >&2
|
||||||
rm -f "$app"; exit 1
|
rm -f "$app"; exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -148,7 +154,9 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
|
||||||
shift
|
shift
|
||||||
set -- "$app" "$@"
|
set -- "$app" "$@"
|
||||||
else
|
else
|
||||||
tput setaf 4; echo "$1 is not an AppImage, it will be zzexe'd"
|
printf '\e[34m'
|
||||||
|
echo "$1 is not an AppImage, it will be zzexe'd"
|
||||||
|
printf '\e[0m'
|
||||||
zzexe -z "$@"
|
zzexe -z "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue