Skip to content

Commit

Permalink
Merge pull request #1174 from Samueru-sama/dev
Browse files Browse the repository at this point in the history
simplify how to get path to appimage
  • Loading branch information
ivan-hc authored Dec 1, 2024
2 parents f5a1ced + 9157b55 commit 1c0d7fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions APP-MANAGER
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ function _clean_launchers() {
rm -f "$AMCACHEDIR"/mountpoints
for var in "$DATADIR"/applications/AppImages/*.desktop; do
# full path to appimage
appimagename=$(grep "^Exec=" 0<"$var" 2>/dev/null | head -1 | cut -c 6- | sed 's/"//g; s/\s.*$//')
appimagename=$(awk -F'=| ' '/Exec=/{print $2; exit}' "$var" | sed 's/"//g; s/\s.*$//')
# name of the appimage
launcher2del=$(basename -- "$(echo "$appimagename" | tr '[:upper:]' '[:lower:]')")
# removable mount point where the appimage may be stored
Expand Down Expand Up @@ -932,7 +932,7 @@ function _update_launchers() {
else
echo " ◆ Update local AppImages integrated manually"
for var in "$DATADIR"/applications/AppImages/*.desktop; do
appimage_full_path=$(grep "^Exec=" 0<"$var" 2>/dev/null | head -1 | cut -c 6- | sed 's/"//g; s/\s.*$//')
appimage_full_path=$(awk -F'=| ' '/Exec=/{print $2; exit}' "$var" | sed 's/"//g; s/\s.*$//')
appimagename=$(basename -- "$appimage_full_path")
appimage_path=$(echo "$appimage_full_path" | sed -E 's|/[^/]+$|/|; s/\/*$//g')
printf "%b\n File: %b%b\033[0m\n Path: %b" "$DIVIDING_LINE" "${Green}" "$appimagename" "$appimage_path"
Expand Down

0 comments on commit 1c0d7fc

Please sign in to comment.