diff --git a/apps/Pi-Apps Terminal Plugin (bash)/credits b/apps/Pi-Apps Terminal Plugin (bash)/credits new file mode 100644 index 0000000..4797bdf --- /dev/null +++ b/apps/Pi-Apps Terminal Plugin (bash)/credits @@ -0,0 +1 @@ +Created and added to pi-apps by Itai-Nelken diff --git a/apps/Pi-Apps Terminal Plugin (bash)/description b/apps/Pi-Apps Terminal Plugin (bash)/description new file mode 100644 index 0000000..3aa3de6 --- /dev/null +++ b/apps/Pi-Apps Terminal Plugin (bash)/description @@ -0,0 +1,17 @@ +Pi-apps terminal is a script that lets you use pi-apps from the terminal, its written in bash. +It has all the commands you will ever need: +'install' - install a app available in pi-apps. +'remove' - uninstall a app installed by pi-apps (uninstall also works). +'multi-install' - install multiple apps. +'multi-remove' - uninstall multiple apps (multi-uninstall also works). +'list-all' - list all the apps in pi-apps (note that this will also list apps that are not available for your OS). +'list-installed' - list all the apps installed by pi-apps. +'list-uninstalled' - list all the uninstalled apps. +'list-corrupted' - list all the corrupted apps. +'search' - usage: search "search-term". search a app available in pi-apps (note that this will show results from the description of the 'apps as well as their name). +'website' - usage: website "app-name". print the website of a app available in pi-apps. +'update' - update all pi-apps components. +'update-apps' - update all pi-apps apps only. +'gui' - launch pi-apps regularly. + +and it makes life easier by eliminating the use of quotes for apps with a space in their name (unless you are using 'multi-install' or 'multi-uninstall'). diff --git a/apps/Pi-Apps Terminal Plugin (bash)/icon-24.png b/apps/Pi-Apps Terminal Plugin (bash)/icon-24.png new file mode 100644 index 0000000..9bf164f Binary files /dev/null and b/apps/Pi-Apps Terminal Plugin (bash)/icon-24.png differ diff --git a/apps/Pi-Apps Terminal Plugin/icon-64.png b/apps/Pi-Apps Terminal Plugin (bash)/icon-64.png similarity index 100% rename from apps/Pi-Apps Terminal Plugin/icon-64.png rename to apps/Pi-Apps Terminal Plugin (bash)/icon-64.png diff --git a/apps/Pi-Apps Terminal Plugin (bash)/install b/apps/Pi-Apps Terminal Plugin (bash)/install new file mode 100755 index 0000000..67c3d70 --- /dev/null +++ b/apps/Pi-Apps Terminal Plugin (bash)/install @@ -0,0 +1,30 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +red="\e[31m" +normal="\e[0m" + +function error() { + echo -e "${red}$1${normal}" + exit 1 +} + +#Removing existing /usr/local/bin/pi-apps and script +echo -n "removing existing version of the script..." +sudo rm -f /usr/local/bin/pi-apps +rm -f "${DIRECTORY}/pi-apps-terminal-bash-edition.sh" +echo "done" + +#Download script +echo -n "Downloading script..." +wget https://raw.githubusercontent.com/Itai-Nelken/PiApps-terminal_bash-edition/main/pi-apps-terminal-bash-edition.sh -O "${DIRECTORY}/pi-apps-terminal-bash-edition.sh" || error "Failed to download pi-apps terminal bash edition script!" +echo "done" +chmod u+x "${DIRECTORY}/pi-apps-terminal-bash-edition.sh" || error "Failed to mark ${DIRECTORY}/pi-apps-terminal-bash-edition.sh as executable!" + +#create launcher script +echo -n "creating launcher script..." +echo '#!/bin/bash +'"${DIRECTORY}"'/pi-apps-terminal-bash-edition.sh "$@"' | sudo tee /usr/local/bin/pi-apps >/dev/null || error "Failed to create pi-apps command in '/usr/local/bin/'!" +sudo chmod +x /usr/local/bin/pi-apps || error "Failed to make launcher script executable!" +echo "done" diff --git a/apps/Pi-Apps Terminal Plugin (bash)/uninstall b/apps/Pi-Apps Terminal Plugin (bash)/uninstall new file mode 100755 index 0000000..2efc4f9 --- /dev/null +++ b/apps/Pi-Apps Terminal Plugin (bash)/uninstall @@ -0,0 +1,17 @@ +#!/bin/bash + +#shellcheck disable=SC2145 + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" +red="\e[31m" +normal="\e[0m" + +function error() { + echo -e "${red}$1${normal}" + exit 1 +} + +echo -n "removing the terminal command and the script..." +sudo rm -f /usr/local/bin/pi-apps || error "Failed to remove /usr/local/bin/pi-apps" +rm -f "$HOME/pi-apps/pi-apps-terminal-bash-edition.sh" +echo "done" diff --git a/apps/Pi-Apps Terminal Plugin/credits b/apps/Pi-Apps Terminal Plugin (python)/credits similarity index 100% rename from apps/Pi-Apps Terminal Plugin/credits rename to apps/Pi-Apps Terminal Plugin (python)/credits diff --git a/apps/Pi-Apps Terminal Plugin/description b/apps/Pi-Apps Terminal Plugin (python)/description similarity index 100% rename from apps/Pi-Apps Terminal Plugin/description rename to apps/Pi-Apps Terminal Plugin (python)/description diff --git a/apps/Pi-Apps Terminal Plugin/icon-24.png b/apps/Pi-Apps Terminal Plugin (python)/icon-24.png similarity index 100% rename from apps/Pi-Apps Terminal Plugin/icon-24.png rename to apps/Pi-Apps Terminal Plugin (python)/icon-24.png diff --git a/apps/Pi-Apps Terminal Plugin (python)/icon-64.png b/apps/Pi-Apps Terminal Plugin (python)/icon-64.png new file mode 100644 index 0000000..d321600 Binary files /dev/null and b/apps/Pi-Apps Terminal Plugin (python)/icon-64.png differ diff --git a/apps/Pi-Apps Terminal Plugin/install b/apps/Pi-Apps Terminal Plugin (python)/install similarity index 100% rename from apps/Pi-Apps Terminal Plugin/install rename to apps/Pi-Apps Terminal Plugin (python)/install diff --git a/apps/Pi-Apps Terminal Plugin/uninstall b/apps/Pi-Apps Terminal Plugin (python)/uninstall similarity index 100% rename from apps/Pi-Apps Terminal Plugin/uninstall rename to apps/Pi-Apps Terminal Plugin (python)/uninstall diff --git a/apps/Pi-Apps Terminal Plugin/website b/apps/Pi-Apps Terminal Plugin (python)/website similarity index 100% rename from apps/Pi-Apps Terminal Plugin/website rename to apps/Pi-Apps Terminal Plugin (python)/website diff --git a/gui b/gui index c704f71..694b594 100755 --- a/gui +++ b/gui @@ -66,17 +66,25 @@ EOF #remove old apps and migrate chromium downgrading apps to the new "Chromium Downgrade" app runonce <<"EOF" + #rewrk chromium downgrading apps to one single new app: 'Downgrade Chromium' rm -rf "${DIRECTORY}/apps/Back to Chromium v86" rm -rf "${DIRECTORY}/apps/Back to Chromium v78" + if [ "$(cat "${DIRECTORY}/data/status/Back to Chromium v78" 2>/dev/null)" == installed ] || [ "$(cat "${DIRECTORY}/data/status/Back to Chromium v86" 2>/dev/null)" == installed ];then + echo "installed" > "${DIRECTORY}/data/status/Downgrade Chromium" + fi + rm -rf "${DIRECTORY}/apps/FreeCAD (precompiled)" rm -rf "${DIRECTORY}/apps/Chromium Media Edition" rm -rf "${DIRECTORY}/apps/Cordless" rm -rf "${DIRECTORY}/apps/Retropie" + + #rename 'Turbo Scratch' app to 'Turbowarp' rm -rf "${DIRECTORY}/apps/Turbo Scratch" mv -f "${DIRECTORY}/data/status/Turbo Scratch" "${DIRECTORY}/data/status/Turbowarp" - if [ "$(cat "${DIRECTORY}/data/status/Back to Chromium v78" 2>/dev/null)" == installed ] || [ "$(cat "${DIRECTORY}/data/status/Back to Chromium v86" 2>/dev/null)" == installed ];then - echo "installed" > "${DIRECTORY}/data/status/Downgrade Chromium" - fi + + #rename 'Pi-Apps Terminal Plugin' app to 'Pi-Apps Terminal Plugin (python)' + mv -f "${DIRECTORY}/data/status/Pi-Apps Terminal Plugin" "${DIRECTORY}/data/status/Pi-Apps Terminal Plugin (python)" + EOF #rename xlunch setting to xlunch-dark @@ -100,12 +108,18 @@ runonce <<"EOF" fi EOF +#ensure curl is installed runonce <<"EOF" if ! command -v curl >/dev/null ;then sudo apt install -y curl fi EOF +#ensure curl is installed +runonce <<"EOF" + +EOF + install() { app="$1" #one app name per line @@ -183,7 +197,8 @@ while true;do if [ "$guimode" == yad ];then if [ -z "$prefix" ];then - buttons=("--button=!${DIRECTORY}/icons/install.png!Install:4" \ + buttons=("--button=Search:4" \ + "--button=!${DIRECTORY}/icons/install.png!Install:4" \ "--button=!${DIRECTORY}/icons/uninstall.png!Uninstall:2" \ "--button=!${DIRECTORY}/icons/info.png!View more about the selected software:0" ) else