diff --git a/src/glacier b/src/glacier index 0634526..98e6d35 100755 --- a/src/glacier +++ b/src/glacier @@ -109,7 +109,7 @@ clear_cache() { } debug_info() { - printf "$blue>> Glacier v3.1.0$reset\n" + printf "$blue>> Glacier v3.1.1$reset\n" printf ">> Checking for valid download backend...\n" whereis wget whereis curl @@ -197,7 +197,7 @@ case $1 in exit 0 ;; -v|--version) - printf "$blue Glacier v3.1.0$reset\n" + printf "$blue Glacier v3.1.1$reset\n" exit 0 ;; -f|-install) @@ -205,6 +205,11 @@ case $1 in printf "$red[ $error ]$reset Please run Glacier as root.\n" exit 1 fi + + if [ "$2" == "" ]; then + printf "$red[ $error ]$reset No package name was supplied.\n" + exit 1 + fi printf "$blue[ i ]$reset Installing package '$2'.\n" read -p "$(printf "$blue[ ? ]$reset Proceed with this operation? (y/n) ")" -n 1 -r @@ -226,6 +231,11 @@ case $1 in printf "$red[ $error ]$reset Please run Glacier as root.\n" exit 1 fi + + if [ "$2" == "" ]; then + printf "$red[ $error ]$reset No package name was supplied.\n" + exit 1 + fi printf "$blue[ i ]$reset Updating package '$2'.\n" read -p "$(printf "$blue[ ? ]$reset Proceed with this operation? (y/n) ")" -n 1 -r @@ -248,6 +258,11 @@ case $1 in exit 1 fi + if [ "$2" == "" ]; then + printf "$red[ $error ]$reset No package name was supplied.\n" + exit 1 + fi + printf "$blue[ i ]$reset Removing package '$2'.\n" read -p "$(printf "$blue[ ? ]$reset Proceed with this operation? (y/n) ")" -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then @@ -264,6 +279,11 @@ case $1 in fi ;; -q|query) + if [ "$2" == "" ]; then + printf "$red[ $error ]$reset No package name was supplied.\n" + exit 1 + fi + query "$@" exit 0 ;; @@ -273,6 +293,11 @@ case $1 in exit 1 fi + if [ "$2" == "" ]; then + printf "$red[ $error ]$reset No package name was supplied.\n" + exit 1 + fi + printf "$blue[ i ]$reset Caching package '$2'.\n" read -p "$(printf "$blue[ ? ]$reset Proceed with this operation? (y/n) ")" -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then @@ -290,6 +315,11 @@ case $1 in exit 1 fi + if [ "$2" == "" ]; then + printf "$red[ $error ]$reset No package name was supplied.\n" + exit 1 + fi + printf "$blue[ i ]$reset Installing package '$2' from cache.\n" read -p "$(printf "$blue[ ? ]$reset Proceed with this operation? (y/n) ")" -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then