diff --git a/manage b/manage index 94d1502..f6b23ae 100755 --- a/manage +++ b/manage @@ -307,12 +307,14 @@ elif [ "$1" == 'check-all' ];then installedonly=1 fi #end of checking for hidden flags + echo -n "Checking for online changes... " 1>&2 + #if the updater script exists in update folder, then just git pull to save time if [ -f "${DIRECTORY}/update/pi-apps/updater" ];then cd "${DIRECTORY}/update/pi-apps" - echo -n "The 'git pull' command says: " 1>&2 - git pull 1>&2 || rm -rf "${DIRECTORY}/update" - fi + git pull || rm -rf "${DIRECTORY}/update" + fi | grep -v "Already up to date." 1>&2 + #re-check and if updater script does not exist then do a git clone if [ ! -f "${DIRECTORY}/update/pi-apps/updater" ];then rm -rf "${DIRECTORY}/update" @@ -320,6 +322,8 @@ elif [ "$1" == 'check-all' ];then git clone --depth=1 "$(cat "${DIRECTORY}/etc/git_url")" 1>&2|| error "failed to clone repository to the update directory!" fi + echo "Done" 1>&2 + if [ $installedonly == 1 ];then #installedonly flag enabled. Remove apps that are uninstalled, disabled, or corrupted applist="$(list_apps installed)" @@ -334,7 +338,7 @@ elif [ "$1" == 'check-all' ];then IFS=$'\n' for app in $applist do - #echo "app: $app" + echo -en "Scanning apps... $app\033[0K\r" 1>&2 newhash="$(dirhash "${DIRECTORY}/update/pi-apps/apps/${app}")" #folder will not exist if local app oldhash="$(dirhash "${DIRECTORY}/apps/${app}")" #folder will not exist if new online app #echo -e "newhash: $newhash\noldhash: $oldhash" 1>&2 @@ -373,6 +377,8 @@ ${app}" updatable='.' fi + echo "Done" 1>&2 + echo "${updatable}" elif [ "$1" == 'update-all' ];then #UPDATE-ALL