diff --git a/APP-MANAGER b/APP-MANAGER index 4473f5c63..e733ea055 100644 --- a/APP-MANAGER +++ b/APP-MANAGER @@ -454,6 +454,7 @@ case "$1" in 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 ' 6) WEBAPP based on a Firefox profile (requires "firefox" in $PATH)' | 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 @@ -568,6 +569,37 @@ 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 " ;; + 6) mkdir -p ./am-scripts ./am-scripts/$arch ./am-scripts/ABOUT && wget -c -q $URL/templates/AM-SAMPLE-Firefox-webapp -O ./am-scripts/$arch/ffwa-$arg && sed -i s/SAMPLE/$arg/g ./am-scripts/$arch/ffwa-$arg && + echo "-----------------------------------------------------------------------"; + read -r -p " ◆ NAME OF THE APP: " RESPONSE + case "$RESPONSE" in + *) sed -i s#GIVEMEANAME#$RESPONSE#g ./am-scripts/$arch/ffwa-$arg + echo " " >> ./am-scripts/ABOUT/ffwa-$arg; echo " WebApp & Firefox Profile for $RESPONSE." >> ./am-scripts/ABOUT/ffwa-$arg; echo " " >> ./am-scripts/ABOUT/ffwa-$arg; echo " SITE: MYWEBSITE" >> ./am-scripts/ABOUT/ffwa-$arg && + echo "◆ ffwa-$arg : WebApp & Firefox Profile for $RESPONSE." >> ./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/ffwa-$arg;; 1) sed -i s/YOURCATEGORY/Audio/g ./am-scripts/$arch/ffwa-$arg;; 2) sed -i s/YOURCATEGORY/Video/g ./am-scripts/$arch/ffwa-$arg;; 3) sed -i s/YOURCATEGORY/Development/g ./am-scripts/$arch/ffwa-$arg;; + 4) sed -i s/YOURCATEGORY/Education/g ./am-scripts/$arch/ffwa-$arg;; 5) sed -i s/YOURCATEGORY/Game/g ./am-scripts/$arch/ffwa-$arg;; 6) sed -i s/YOURCATEGORY/Graphics/g ./am-scripts/$arch/ffwa-$arg;; 7) sed -i s/YOURCATEGORY/Network/g ./am-scripts/$arch/ffwa-$arg;; + 8) sed -i s/YOURCATEGORY/Office/g ./am-scripts/$arch/ffwa-$arg;; 9) sed -i s/YOURCATEGORY/Science/g ./am-scripts/$arch/ffwa-$arg;; 10) sed -i s/YOURCATEGORY/Settings/g ./am-scripts/$arch/ffwa-$arg;; 11) sed -i s/YOURCATEGORY/System/g ./am-scripts/$arch/ffwa-$arg;; + 12|*) sed -i s/YOURCATEGORY/Utility/g ./am-scripts/$arch/ffwa-$arg;; + esac + echo "-----------------------------------------------------------------------"; + read -r -p " ◆ URL OF THE WEBAPP: " RESPONSE + case "$RESPONSE" in + *) sed -i s#MYWEBSITE#$RESPONSE#g ./am-scripts/$arch/ffwa-$arg; sed -i s#MYWEBSITE#$RESPONSE#g ./am-scripts/ABOUT/ffwa-$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/ffwa-$arg + esac + echo "-----------------------------------------------------------------------"; + 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 @@ -705,6 +737,6 @@ case "$1" in fi done shift;; - 'version'|'-v'|'--version') echo "3.0.5";; + 'version'|'-v'|'--version') echo "3.0.6";; *) exec /opt/am/APP-MANAGER ;; esac