[Updated] euphoria-install.sh: Cleaned up code formatting
This commit is contained in:
parent
7ff150fe89
commit
4263b6f167
@ -26,6 +26,7 @@ check_deps(){
|
||||
}
|
||||
|
||||
check_root(){
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
printf "${LRED}This script must be run as root${NC}\n" 1>&2
|
||||
exit 1
|
||||
@ -33,6 +34,7 @@ check_root(){
|
||||
}
|
||||
|
||||
check_install(){
|
||||
|
||||
if [ ! -d ${target_dir}/${name}-${version}-Linux-${arch} ];then
|
||||
printf "Install check passed...moving on...\n"
|
||||
else
|
||||
@ -40,6 +42,7 @@ check_install(){
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
download_pkgs(){
|
||||
|
||||
if [ ! -f ${tmpdir}/${name}-${version}.${fext} ];then
|
||||
@ -87,6 +90,7 @@ uninstall_pkg(){
|
||||
if [ ! -d ${target_dir}/${name}-${version}-Linux-${arch} ];then
|
||||
printf "${name}-${version} is not installed\n"
|
||||
else
|
||||
|
||||
rm -v -r ${target_dir}/${name}-${version}-Linux-${arch}
|
||||
rm -v /usr/bin/eui
|
||||
rm -v /usr/bin/euc
|
||||
@ -101,6 +105,7 @@ uninstall_pkg(){
|
||||
rm -v /usr/bin/echoversion
|
||||
rm -v /usr/bin/creole
|
||||
rm -v /usr/bin/eucoverage
|
||||
|
||||
if [ ! -d ${target_dir}/${name}-${version}-Linux-${arch} ];then
|
||||
echo
|
||||
printf "${name}-${version} is uninstalled\n"
|
||||
@ -133,6 +138,8 @@ remove_tmp(){
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case $1 in
|
||||
install | i)
|
||||
check_root
|
||||
@ -143,13 +150,16 @@ case $1 in
|
||||
install_build
|
||||
post_install
|
||||
;;
|
||||
|
||||
remove | r)
|
||||
check_root
|
||||
uninstall_pkg
|
||||
;;
|
||||
clean | c)
|
||||
|
||||
clean | c)
|
||||
remove_tmp
|
||||
;;
|
||||
|
||||
*)
|
||||
printf """
|
||||
[SYNOPSIS]
|
||||
|
Loading…
x
Reference in New Issue
Block a user