Skip to content

Commit

Permalink
"AM" 3.0.5 RELEASED!
Browse files Browse the repository at this point in the history
Added template for AppImage, DEB, ZIP and TAR.BZ2 / TAR.GZ / TAR.XZ packages downloadable from Arch User Repository (AUR).
I've merged the four templates for the applications from github.com into one script, so I've reduced the number of options from the option `-t` or `template`.
  • Loading branch information
ivan-hc authored May 1, 2022
1 parent 50700f7 commit 5306a4b
Showing 1 changed file with 38 additions and 78 deletions.
116 changes: 38 additions & 78 deletions APP-MANAGER
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,10 @@ case "$1" in
'
echo ' 0) APPIMAGE updatable with "appimageupdatetool"' | tr a-z A-Z
echo ' 1) APPIMAGE updatable using a separated zsync file' | tr a-z A-Z
echo " 2) APPIMAGE from github.com (always updatable)" | tr a-z A-Z
echo ' 3) DEB package from github.com (always updatable)' | tr a-z A-Z
echo ' 4) TAR archive from github.com (always updatable)' | tr a-z A-Z
echo ' 5) ZIP archive from github.com (always updatable)' | tr a-z A-Z
echo " 6) APPIMAGE, build your own with pkg2appimage and appimagetool" | tr a-z A-Z
echo " 7) APPIMAGE, build your own with pkg2appimage using a custom AppRun" | tr a-z A-Z
echo " 2) APPIMAGE/deb/tar/zip ARCHIVE from github.com (always updatable)" | tr a-z A-Z
echo " 3) APPIMAGE/deb/tar/zip ARCHIVE from AUR (always updatable)" | tr a-z A-Z
echo " 4) APPIMAGE, build your own with pkg2appimage and appimagetool" | tr a-z A-Z
echo " 5) APPIMAGE, build your own with pkg2appimage using a custom AppRun" | tr a-z A-Z
echo " "
read -r -p " WHAT KIND OF PROGRAM DO YOU WANT TO WRITE A SCRIPT FOR? : " response
case "$response" in
Expand All @@ -467,15 +465,15 @@ case "$1" in
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: " >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list; echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
2) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-GitHub-generic-appimage -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
2) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-GitHub-generic -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY')
https://github.com/" RESPONSE
case "$RESPONSE" in
*) sed -i s#REPLACETHIS#$RESPONSE#g ./am-scripts/$arch/$arg
COMMENT=$(curl https://api.github.com/repos/$RESPONSE 2>/dev/null | grep description | sed 's/"description": "//' | sed 's/",//')
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: https://github.com/$RESPONSE" >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list
echo "$arg : $COMMENT" >> ./am-scripts/list
esac
echo " LIST OF CATEGORIES:"; echo ""; echo " 0) AudioVideo"; echo " 1) Audio"; echo " 2) Video"; echo " 3) Development"; echo " 4) Education"; echo " 5) Game";
echo " 6) Graphics"; echo " 7) Network"; echo " 8) Office"; echo " 9) Science"; echo " 10) Settings"; echo " 11) System"; echo " 12) Utility (default)"; echo "";
Expand All @@ -487,33 +485,16 @@ case "$1" in
12|*) sed -i s/YOURCATEGORY/Utility/g ./am-scripts/$arch/$arg;;
esac
echo "-----------------------------------------------------------------------";
read -r -p "COPY/PASTE THE URL OF THE ICON HERE
URL: " RESPONSE
read -r -p "CHOOSE A FILE EXTENSION, IE
APPIMAGE (1), DEB (2), TAR.BZ2 (3), TAR.GZ (4), TAR.XZ (5) OR ZIP (6): " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac
echo "-----------------------------------------------------------------------";
echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
3) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-GitHub-generic-deb -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY')
https://github.com/" RESPONSE
case "$RESPONSE" in
*) sed -i s#REPLACETHIS#$RESPONSE#g ./am-scripts/$arch/$arg
COMMENT=$(curl https://api.github.com/repos/$RESPONSE 2>/dev/null | grep description | sed 's/"description": "//' | sed 's/",//')
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: https://github.com/$RESPONSE" >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list
esac
echo " LIST OF CATEGORIES:"; echo ""; echo " 0) AudioVideo"; echo " 1) Audio"; echo " 2) Video"; echo " 3) Development"; echo " 4) Education"; echo " 5) Game";
echo " 6) Graphics"; echo " 7) Network"; echo " 8) Office"; echo " 9) Science"; echo " 10) Settings"; echo " 11) System"; echo " 12) Utility (default)"; echo "";
read -r -p " CHOOSE A CATEGORY : " response
case "$response" in
0) sed -i s/YOURCATEGORY/AudioVideo/g ./am-scripts/$arch/$arg;; 1) sed -i s/YOURCATEGORY/Audio/g ./am-scripts/$arch/$arg;; 2) sed -i s/YOURCATEGORY/Video/g ./am-scripts/$arch/$arg;; 3) sed -i s/YOURCATEGORY/Development/g ./am-scripts/$arch/$arg;;
4) sed -i s/YOURCATEGORY/Education/g ./am-scripts/$arch/$arg;; 5) sed -i s/YOURCATEGORY/Game/g ./am-scripts/$arch/$arg;; 6) sed -i s/YOURCATEGORY/Graphics/g ./am-scripts/$arch/$arg;; 7) sed -i s/YOURCATEGORY/Network/g ./am-scripts/$arch/$arg;;
8) sed -i s/YOURCATEGORY/Office/g ./am-scripts/$arch/$arg;; 9) sed -i s/YOURCATEGORY/Science/g ./am-scripts/$arch/$arg;; 10) sed -i s/YOURCATEGORY/Settings/g ./am-scripts/$arch/$arg;; 11) sed -i s/YOURCATEGORY/System/g ./am-scripts/$arch/$arg;;
12|*) sed -i s/YOURCATEGORY/Utility/g ./am-scripts/$arch/$arg;;
esac
1) sed -i s/NAMETHATEXTENSION/AppImage/g ./am-scripts/$arch/$arg;;
2) sed -i s/NAMETHATEXTENSION/deb/g ./am-scripts/$arch/$arg;;
3) sed -i s/NAMETHATEXTENSION/tar.bz2/g ./am-scripts/$arch/$arg;;
4) sed -i s/NAMETHATEXTENSION/tar.gz/g ./am-scripts/$arch/$arg;;
5) sed -i s/NAMETHATEXTENSION/tar.xz/g ./am-scripts/$arch/$arg;;
6) sed -i s/NAMETHATEXTENSION/zip/g ./am-scripts/$arch/$arg;;
esac
echo "-----------------------------------------------------------------------";
read -r -p " ◆ COPY/PASTE THE URL OF THE ICON HERE
URL: " RESPONSE
Expand All @@ -522,23 +503,25 @@ case "$1" in
esac
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD A PATH FOR THE EXTRACTED BINARY INTO THE ARCHIVE,
FOR EXAMPLE 'opt/$arg' OR 'usr/share/$arg'
FOR EXAMPLE 'opt/$arg' OR 'usr/share/$arg'
(LEAVE BLANK IF YOU MANAGE APPIMAGES OR ZIP PACKAGES)
PATH/TO/FILES/IN/THE/ARCHIVE: " RESPONSE
case "$RESPONSE" in
*) sed -i s#PATHTOAPP#$RESPONSE#g ./am-scripts/$arch/$arg
esac
echo "-----------------------------------------------------------------------";
echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
4) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-GitHub-generic-tar -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&

3) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-AUR-generic -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY')
https://github.com/" RESPONSE
read -r -p " ◆ NAME OF THE APP: " RESPONSE
case "$RESPONSE" in
*) sed -i s#REPLACETHIS#$RESPONSE#g ./am-scripts/$arch/$arg
COMMENT=$(curl https://api.github.com/repos/$RESPONSE 2>/dev/null | grep description | sed 's/"description": "//' | sed 's/",//')
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: https://github.com/$RESPONSE" >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list
*) sed -i s#NAMETHATAPP#$RESPONSE#g ./am-scripts/$arch/$arg
COMMENT=$(wget -q https://aur.archlinux.org/packages/$arg -O - | grep -A1 Description | tail -1 | cut -c 30- | rev | cut -c 6- | rev)
UPSTREAMURL=$(wget -q https://aur.archlinux.org/packages/$arg -O - | grep -A3 Upstream | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | head -1)
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: $UPSTREAMURL" >> ./am-scripts/ABOUT/$arg &&
echo "$arg : $COMMENT" >> ./am-scripts/list
esac
echo " LIST OF CATEGORIES:"; echo ""; echo " 0) AudioVideo"; echo " 1) Audio"; echo " 2) Video"; echo " 3) Development"; echo " 4) Education"; echo " 5) Game";
echo " 6) Graphics"; echo " 7) Network"; echo " 8) Office"; echo " 9) Science"; echo " 10) Settings"; echo " 11) System"; echo " 12) Utility (default)"; echo "";
Expand All @@ -550,61 +533,38 @@ case "$1" in
12|*) sed -i s/YOURCATEGORY/Utility/g ./am-scripts/$arch/$arg;;
esac
echo "-----------------------------------------------------------------------";
read -r -p "COPY/PASTE THE URL OF THE ICON HERE
URL: " RESPONSE
read -r -p "CHOOSE A FILE EXTENSION, IE
APPIMAGE (1), DEB (2), TAR.BZ2 (3), TAR.GZ (4), TAR.XZ (5) OR ZIP (6): " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD A PATH FOR THE EXTRACTED BINARY INTO THE ARCHIVE,
FOR EXAMPLE 'opt/$arg' OR 'usr/share/$arg'
PATH/TO/FILES/IN/THE/ARCHIVE: " RESPONSE
case "$RESPONSE" in
*) sed -i s#PATHTOAPP#$RESPONSE#g ./am-scripts/$arch/$arg
1) sed -i s/NAMETHATEXTENSION/AppImage/g ./am-scripts/$arch/$arg;;
2) sed -i s/NAMETHATEXTENSION/deb/g ./am-scripts/$arch/$arg;;
3) sed -i s/NAMETHATEXTENSION/tar.bz2/g ./am-scripts/$arch/$arg;;
4) sed -i s/NAMETHATEXTENSION/tar.gz/g ./am-scripts/$arch/$arg;;
5) sed -i s/NAMETHATEXTENSION/tar.xz/g ./am-scripts/$arch/$arg;;
6) sed -i s/NAMETHATEXTENSION/zip/g ./am-scripts/$arch/$arg;;
esac
echo "-----------------------------------------------------------------------";
echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
5) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-GitHub-generic-zip -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY')
https://github.com/" RESPONSE
case "$RESPONSE" in
*) sed -i s#REPLACETHIS#$RESPONSE#g ./am-scripts/$arch/$arg
COMMENT=$(curl https://api.github.com/repos/$RESPONSE 2>/dev/null | grep description | sed 's/"description": "//' | sed 's/",//')
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: https://github.com/$RESPONSE" >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list
esac
echo " LIST OF CATEGORIES:"; echo ""; echo " 0) AudioVideo"; echo " 1) Audio"; echo " 2) Video"; echo " 3) Development"; echo " 4) Education"; echo " 5) Game";
echo " 6) Graphics"; echo " 7) Network"; echo " 8) Office"; echo " 9) Science"; echo " 10) Settings"; echo " 11) System"; echo " 12) Utility (default)"; echo "";
read -r -p " CHOOSE A CATEGORY : " response
case "$response" in
0) sed -i s/YOURCATEGORY/AudioVideo/g ./am-scripts/$arch/$arg;; 1) sed -i s/YOURCATEGORY/Audio/g ./am-scripts/$arch/$arg;; 2) sed -i s/YOURCATEGORY/Video/g ./am-scripts/$arch/$arg;; 3) sed -i s/YOURCATEGORY/Development/g ./am-scripts/$arch/$arg;;
4) sed -i s/YOURCATEGORY/Education/g ./am-scripts/$arch/$arg;; 5) sed -i s/YOURCATEGORY/Game/g ./am-scripts/$arch/$arg;; 6) sed -i s/YOURCATEGORY/Graphics/g ./am-scripts/$arch/$arg;; 7) sed -i s/YOURCATEGORY/Network/g ./am-scripts/$arch/$arg;;
8) sed -i s/YOURCATEGORY/Office/g ./am-scripts/$arch/$arg;; 9) sed -i s/YOURCATEGORY/Science/g ./am-scripts/$arch/$arg;; 10) sed -i s/YOURCATEGORY/Settings/g ./am-scripts/$arch/$arg;; 11) sed -i s/YOURCATEGORY/System/g ./am-scripts/$arch/$arg;;
12|*) sed -i s/YOURCATEGORY/Utility/g ./am-scripts/$arch/$arg;;
esac
echo "-----------------------------------------------------------------------";
read -r -p " ◆ COPY/PASTE THE URL OF THE ICON HERE
URL: " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac
echo "-----------------------------------------------------------------------";
read -r -p " ◆ ADD A PATH FOR THE EXTRACTED BINARY INTO THE ARCHIVE,
FOR EXAMPLE 'opt/$arg' OR 'usr/share/$arg'
FOR EXAMPLE 'opt/$arg' OR 'usr/share/$arg'
(LEAVE BLANK IF YOU MANAGE APPIMAGES OR ZIP PACKAGES)
PATH/TO/FILES/IN/THE/ARCHIVE: " RESPONSE
case "$RESPONSE" in
*) sed -i s#PATHTOAPP#$RESPONSE#g ./am-scripts/$arch/$arg
esac
echo "-----------------------------------------------------------------------";
echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
6) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-pkg2appimage -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
4) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-pkg2appimage -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: " >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list; echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
7) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-pkg2appimage-custom -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
5) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-pkg2appimage-custom -O ./am-scripts/$arch/$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/$arg &&
echo " " >> ./am-scripts/ABOUT/$arg; echo " $COMMENT" >> ./am-scripts/ABOUT/$arg; echo " " >> ./am-scripts/ABOUT/$arg; echo " SITE: " >> ./am-scripts/ABOUT/$arg &&
echo ''$arg' : '$COMMENT'' >> ./am-scripts/list; echo ""; echo " All files are saved in $(xdg-user-dir DESKTOP)/am-scripts
" ;;
Expand Down Expand Up @@ -745,6 +705,6 @@ case "$1" in
fi
done
shift;;
'version'|'-v'|'--version') echo "3.0.4-3";;
'version'|'-v'|'--version') echo "3.0.5";;
*) exec /opt/am/APP-MANAGER ;;
esac

0 comments on commit 5306a4b

Please sign in to comment.