Skip to content

Commit

Permalink
"AM" 3.0.4 RELEASED!
Browse files Browse the repository at this point in the history
Advanced features for "templates" from github.com
  • Loading branch information
ivan-hc authored Apr 28, 2022
1 parent 500651f commit 5ba68f5
Showing 1 changed file with 122 additions and 25 deletions.
147 changes: 122 additions & 25 deletions APP-MANAGER
Original file line number Diff line number Diff line change
Expand Up @@ -440,33 +440,130 @@ case "$1" in
*) for var in $arg
do
cd $(xdg-user-dir DESKTOP)
echo ""
echo " EACH MODEL IS BASED ON A DIFFERENT METHOD OF BUILDING/UPDATING THE PROGRAM:"
echo ""
echo ' 0) My AppImage can be updated using "appimageupdatetool"'
echo ' 1) My AppImage uses a separated zsync file ("zsync" needed)'
echo " 2) My AppImage is not updatable, the version must be compared with a website"
echo ' 3) My standalone *.DEB package come from a site or repository ("ar" needed)'
echo ' 4) My standalone *.TAR archive come from a site or repository ("tar" needed)'
echo ' 5) My standalone *.ZIP archive come from a site or repository ("unzip" needed)'
echo " 6) My AppImage is built with pkg2appimage & appimagetool"
echo " 7) My AppImage is built with pkg2appimage but with a custom AppRun"
echo " 8) Generic script to Download & Update any AppImage from Github (RECOMMENDED)"
echo " 9) My AppImage is listed on https://appimage.github.io"
echo "##############################################################"; echo ""
echo ' Create templates for "'$arg'"
' | tr a-z A-Z
echo "--------------------------------------------------------------"; echo ""
echo " EACH MODEL IS BASED ON A DIFFERENT METHOD OF BUILDING/UPDATING THE PROGRAM.
"
echo ' PLEASE, SELECT A TEMPLATE FOR "'$(echo $arg | tr a-z A-Z)'":
'
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 " "
read -r -p " WHAT KIND OF PROGRAM DO YOU WANT TO WRITE A SCRIPT FOR? : " response
case "$response" in
0) wget -c $URL/templates/AM-SAMPLE-for-appimageupdate -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
1) wget -c $URL/templates/AM-SAMPLE-for-zsync -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
2) wget -c $URL/templates/AM-SAMPLE-AppImage-from-site -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
3) wget -c $URL/templates/AM-SAMPLE-DEB-from-site -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
4) wget -c $URL/templates/AM-SAMPLE-TAR-from-site -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
5) wget -c $URL/templates/AM-SAMPLE-ZIP-from-site -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
6) wget -c $URL/templates/AM-SAMPLE-pkg2appimage -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
7) wget -c $URL/templates/AM-SAMPLE-pkg2appimage-custom -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
8) wget -c $URL/templates/AM-SAMPLE-GitHub-generic -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
9) wget -c $URL/templates/AM-SAMPLE-AppImage.GitHub.io -O $arg.AM && sed -i s/SAMPLE/$arg/g $arg.AM;;
*) echo ""; echo " No valid argument was chosen: process aborted! "; echo ""; exit;;
0) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-for-appimageupdate -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
" ;;
1) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-for-zsync -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
" ;;
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 &&
read -r -p " ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY') : " 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
read -r -p " COPY/PASTE THE URL OF THE ICON HERE : " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac; 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 &&
read -r -p " ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY') : " 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
read -r -p " COPY/PASTE THE URL OF THE ICON HERE : " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac; 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 &&
read -r -p " ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY') : " 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
read -r -p " COPY/PASTE THE URL OF THE ICON HERE : " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac; 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 &&
read -r -p " ADD THE NAME OF THE REPOSITORY (EXAMPLE 'NAME/REPOSITORY') : " 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
read -r -p " COPY/PASTE THE URL OF THE ICON HERE : " RESPONSE
case "$RESPONSE" in
*) sed -i s#YOURICONURL#$RESPONSE#g ./am-scripts/$arch/$arg
esac; 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 &&
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 &&
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
" ;;
*) echo ""; echo " No valid argument was chosen: process aborted! " | tr a-z A-Z; echo ""; break;;
esac
done
esac
Expand Down Expand Up @@ -603,6 +700,6 @@ case "$1" in
fi
done
shift;;
'version'|'-v'|'--version') echo "3.0.3-2";;
'version'|'-v'|'--version') echo "3.0.4";;
*) exec /opt/am/APP-MANAGER ;;
esac

0 comments on commit 5ba68f5

Please sign in to comment.