Skip to content

Commit

Permalink
Update clean.am: re-enable the function to clean old modules
Browse files Browse the repository at this point in the history
Fix #450
  • Loading branch information
ivan-hc authored Apr 21, 2024
1 parent 9820076 commit 62c8c67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/clean.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ function _clean_launchers(){

function _clean_old_modules(){
if [ $AMCLI == am ] 2>/dev/null; then
MODULES=$(cat /opt/am/APP-MANAGER | grep -Eo '\S*.am\S*' | grep 'modules' | sed 's@.*/@@' | grep -v ";" | grep ".am" | uniq | sort)
MODULES=$(cat /opt/am/APP-MANAGER | grep -Eo '\S*.am\S*' | sed 's@.*/@@' | grep -v ";" | grep ".am" | uniq | sort)
else
MODULES=$(cat "$AMCLIPATH" | grep -Eo '\S*.am\S*' | grep 'modules' | sed 's@.*/@@' | grep -v ";" | grep ".am" | uniq | sort)
MODULES=$(cat "$AMCLIPATH" | grep -Eo '\S*.am\S*' | sed 's@.*/@@' | grep -v ";" | grep ".am" | uniq | sort)
fi
for m in "$APPSPATH"/"$AMCLI"/modules/*; do
if [[ "${MODULES}" != *"$(basename -- "$m")"* ]];then
Expand All @@ -50,7 +50,7 @@ function _clean_all(){
if test -f "$DATADIR"/applications/AppImages/*.desktop 2> /dev/null; then
_clean_launchers && echo ' ◆ Removed orphaned launchers produced with the "--launcher" option'
fi
#_clean_old_modules && echo ' ◆ Removed obsolete modules'
_clean_old_modules && echo ' ◆ Removed obsolete modules'
echo -e "\n DONE!\n"
}

Expand Down

0 comments on commit 62c8c67

Please sign in to comment.