Skip to content

Commit 12b27db

Browse files
authored
Update install.am
- uses the list of applications in the AM database to check if the installed app exists and requires to be reinstalled (option "reinstall") Method acquired from the previous commit in APP-MANAGER see 6c5ad0a
1 parent 6c5ad0a commit 12b27db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/install.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,16 +592,17 @@ case "$1" in
592592
;;
593593

594594
'reinstall')
595+
_completion_lists
595596
printf "%b\n Checking for changes of the installation scripts in the online database...\n%b\n" "$DIVIDING_LINE" "$DIVIDING_LINE"
596597
_determine_args
597598
for arg in $ARGS; do
598599
argpath=$(echo "$ARGPATHS" | grep "/$arg$")
599600
if [ -f "$argpath"/AM-updater ]; then
600601
mkdir -p "$argpath"/.am-installer
601602
scriptname=$(ls "$argpath/.am-installer/" | head -1)
602-
if [ -n "$scriptname" ]; then
603+
if [ -n "$scriptname" ] && grep -q "^◆ $scriptname :" "$AMDATADIR/$ARCH-apps"; then
603604
CURRENT=$(cat "$argpath"/.am-installer/"$scriptname")
604-
curl --output /dev/null --silent --head --fail "$APPSDB"/"$scriptname" 1>/dev/null && SOURCE=$(curl -Ls "$APPSDB"/"$scriptname")
605+
SOURCE=$(curl -Ls "$APPSDB"/"$scriptname")
605606
if [ -n "$SOURCE" ] && [ "$CURRENT" != "$SOURCE" ]; then
606607
reinstall_true=1
607608
"$AMCLIPATH_ORIGIN" -R "$arg"

0 commit comments

Comments
 (0)