diff --git a/INSTALL b/INSTALL index 26573a2f2..492841981 100644 --- a/INSTALL +++ b/INSTALL @@ -1,13 +1,13 @@ #!/bin/sh -# CREATING THE MAIN FOLDER FOR "AM" +# CREATING THE MAIN DIRECTORY FOR "AM" mkdir -p /opt/am/.cache /opt/am/modules -cd /opt/am +cd /opt/am || exit # CREATE THE SCRIPT NEEDED TO UNINSTALL "AM" rm -R -f /opt/am/remove -echo "#!/bin/sh -rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh" >> /opt/am/remove +echo '#!/bin/sh +rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh' >> /opt/am/remove chmod a+x /opt/am/remove # DOWNLOAD THE MAIN SCRIPT @@ -25,9 +25,9 @@ wget -q "https://raw.githubusercontent.com/ivan-hc/AM-application-manager/main/p MODULES=$(wget -q https://api.github.com/repos/ivan-hc/AM/contents/modules -O - | grep download_url | cut -d '"' -f 4) for module in $MODULES; do for v in $module; do - cd /opt/am/modules + cd /opt/am/modules || tmp mkdir tmp - cd tmp + cd tmp || tmp wget -q "$v" cd .. mv tmp/*.am ./ @@ -36,16 +36,15 @@ for module in $MODULES; do done done -# ENABLE NON-ROOT PERMISSIONS TO THE MAIN FOLDER FOR THE CURRENT USER +# ENABLE NON-ROOT PERMISSIONS TO THE MAIN DIRECTORY FOR THE CURRENT USER currentuser=$(who | awk '{print $1}') chown -R $currentuser /opt/am 2> /dev/null # ADD THE BASH COMPLETION SCRIPT -echo '#!/usr/bin/env bash' >> /opt/am/am-completion.sh; echo 'complete -W "$(cat /opt/am/list 2>/dev/null)" am' >> /opt/am/am-completion.sh +echo '#!/usr/bin/env bash +complete -W "$(cat /opt/am/list 2>/dev/null)" am' >> /opt/am/am-completion.sh chmod a+x /opt/am/am-completion.sh -rm -R -f /opt/am/remove; echo '#!/bin/sh' >> /opt/am/remove -echo 'rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh' >> /opt/am/remove -chmod a+x /opt/am/remove; chown -R $currentuser /opt/am/remove 2>/dev/null + if test -f /etc/bash_completion.d; then mv /opt/am/am-completion.sh /etc/bash_completion.d/ else diff --git a/modules/install.am b/modules/install.am index 5b035ac01..c87043059 100644 --- a/modules/install.am +++ b/modules/install.am @@ -190,7 +190,6 @@ while [ -n "$1" ]; do echo -e " 💀 ERROR DURING INSTALLATION, REMOVED $(echo '"'$arg'"' | tr a-z A-Z)!" $AMCLIPATH -R $LATESTDIR 1> /dev/null else - chown -R $currentuser $AMPATH/.cache/about 2> /dev/null for metapackage in $(echo "$METAPACKAGES"); do if grep -q "$metapackage" ./$arg 2> /dev/null; then metascript=$(cd $APPSPATH && ls -td * | head -1) diff --git a/programs/x86_64/deadbeef-appimage b/programs/x86_64/deadbeef-appimage index 9b9df8dc5..e4b684105 100644 --- a/programs/x86_64/deadbeef-appimage +++ b/programs/x86_64/deadbeef-appimage @@ -30,7 +30,7 @@ ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP" # SCRIPT TO UPDATE THE PROGRAM cat >> /opt/"$APP"/AM-updater << 'EOF' #!/bin/sh -APP=deadbeef-devel-appimage +APP=deadbeef-appimage REPO="Samueru-sama/DeaDBeef-AppImage" version0=$(cat /opt/$APP/version) version=$(wget -q https://api.github.com/repos/$REPO/releases -O - | grep browser_download_url | grep -i appimage | cut -d '"' -f 4 | head -1)