Add bash-based pi-apps terminal client and rename existing one to python
parent
4b8f88b4c6
commit
1f7d0de103
@ -0,0 +1 @@
|
||||
Created and added to pi-apps by Itai-Nelken
|
@ -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').
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@ -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"
|
@ -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"
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue