From dc3329b952af0c5801694b8a4461d4faf872618f Mon Sep 17 00:00:00 2001 From: Botspot Date: Tue, 6 Oct 2020 12:39:13 -0500 Subject: [PATCH] standardize script beginning --- apps/Arduino/install | 4 +++- apps/BalenaEtcher/install | 9 ++++----- apps/BalenaEtcher/uninstall | 6 +++--- apps/Chromium Media Edition/install | 4 +++- apps/Chromium Media Edition/uninstall | 4 +++- apps/CommanderPi/install | 5 +++-- apps/CommanderPi/uninstall | 6 +++--- apps/Conky/install | 5 +++-- apps/Conky/uninstall | 5 +++-- apps/Cool Retro Term/install | 6 +++--- apps/Cool Retro Term/uninstall | 8 +++++++- apps/Cura/install | 5 +++-- apps/Cura/uninstall | 6 +++--- apps/Discord/install | 5 +++-- apps/Discord/uninstall | 5 +++-- apps/FreeCAD (precompiled)/install | 6 +++--- apps/FreeCAD (precompiled)/uninstall | 6 +++--- apps/FreeCAD/install | 5 +++-- apps/FreeCAD/uninstall | 5 +++-- apps/Minecraft/install | 5 +++-- apps/Minecraft/uninstall | 5 +++-- apps/Pi Power Tools/install | 5 +++-- apps/Pi Power Tools/uninstall | 6 +++--- apps/Raspi2png/install | 6 +++--- apps/Raspi2png/uninstall | 4 +++- apps/TBOPlayer/install | 5 +++-- apps/TBOPlayer/uninstall | 6 +++--- apps/Windows 10 Theme/install | 5 +++-- apps/Windows 10 Theme/uninstall | 6 +++--- apps/piKiss/install | 5 +++-- apps/piKiss/uninstall | 5 +++-- apps/template/install | 5 +++-- apps/template/uninstall | 5 +++-- 33 files changed, 104 insertions(+), 74 deletions(-) diff --git a/apps/Arduino/install b/apps/Arduino/install index 5228970..9a7b61e 100755 --- a/apps/Arduino/install +++ b/apps/Arduino/install @@ -1,7 +1,9 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/BalenaEtcher/install b/apps/BalenaEtcher/install index fecea56..52adf21 100755 --- a/apps/BalenaEtcher/install +++ b/apps/BalenaEtcher/install @@ -1,15 +1,14 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } -# Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" - rm -f ./balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb - +# Get dependencies wget https://github.com/futurejones/balena-etcher-arm/releases/download/v1.5.63/balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb sudo apt install -y ./balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb || error "failed to install deb file!" diff --git a/apps/BalenaEtcher/uninstall b/apps/BalenaEtcher/uninstall index 11252cf..08c3ba4 100755 --- a/apps/BalenaEtcher/uninstall +++ b/apps/BalenaEtcher/uninstall @@ -1,10 +1,10 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" - sudo apt purge -y balena-etcher-electron || error "failed to purge the deb file!" diff --git a/apps/Chromium Media Edition/install b/apps/Chromium Media Edition/install index 294b9a7..1bce053 100755 --- a/apps/Chromium Media Edition/install +++ b/apps/Chromium Media Edition/install @@ -1,7 +1,9 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/Chromium Media Edition/uninstall b/apps/Chromium Media Edition/uninstall index 24c498b..9c835b2 100755 --- a/apps/Chromium Media Edition/uninstall +++ b/apps/Chromium Media Edition/uninstall @@ -1,7 +1,9 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/CommanderPi/install b/apps/CommanderPi/install index 6fd2c10..fdbf9ea 100755 --- a/apps/CommanderPi/install +++ b/apps/CommanderPi/install @@ -1,12 +1,13 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } # Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/pkg-install" "python3-tk python3-pil python3-pil.imagetk" "$(dirname "$0")" || exit 1 git clone https://github.com/Jack477/CommanderPi || error "failed to download repository!" diff --git a/apps/CommanderPi/uninstall b/apps/CommanderPi/uninstall index c020bae..c69e375 100755 --- a/apps/CommanderPi/uninstall +++ b/apps/CommanderPi/uninstall @@ -1,11 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } - -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 rm -rf ~/CommanderPi || error "failed to remove commanderpi folder!" diff --git a/apps/Conky/install b/apps/Conky/install index ec40677..00b4636 100755 --- a/apps/Conky/install +++ b/apps/Conky/install @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/Conky/uninstall b/apps/Conky/uninstall index 3370eab..c69b0db 100755 --- a/apps/Conky/uninstall +++ b/apps/Conky/uninstall @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/Cool Retro Term/install b/apps/Cool Retro Term/install index 82bc4b6..3abf4d2 100755 --- a/apps/Cool Retro Term/install +++ b/apps/Cool Retro Term/install @@ -1,12 +1,12 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } - # Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/pkg-install" "build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtgraphicaleffects qml-module-qtquick-dialogs qml-module-qtquick-localstorage qml-module-qtquick-window2 qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel" "$(dirname "$0")" || exit 1 # Get CRT from github diff --git a/apps/Cool Retro Term/uninstall b/apps/Cool Retro Term/uninstall index 561c79b..25b9df9 100755 --- a/apps/Cool Retro Term/uninstall +++ b/apps/Cool Retro Term/uninstall @@ -1,10 +1,16 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + rm -rf ~/.cache/cool-retro-term rm -rf ~/cool-retro-term rm -f ~/.local/share/applications/crt.desktop -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 rm -rf ~/.local/share/cool-retro-term ~/cool-retro-term diff --git a/apps/Cura/install b/apps/Cura/install index 95e4a85..0207807 100755 --- a/apps/Cura/install +++ b/apps/Cura/install @@ -1,10 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" wget -O ~/Cura-mb-master-armhf-20200902.AppImage https://github.com/smartavionics/Cura/releases/download/20200922/Cura-mb-master-armhf-20200922.AppImage || error "Failed to download!" diff --git a/apps/Cura/uninstall b/apps/Cura/uninstall index 8bc364a..d713495 100755 --- a/apps/Cura/uninstall +++ b/apps/Cura/uninstall @@ -1,11 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } - -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" rm -f ~/.local/share/applications/cura.desktop rm -f ~/Cura-mb-master-armhf-20200902.AppImage rm -rf ~/.cache/cura diff --git a/apps/Discord/install b/apps/Discord/install index 17a97a0..d92c5f8 100755 --- a/apps/Discord/install +++ b/apps/Discord/install @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/Discord/uninstall b/apps/Discord/uninstall index b0edbcb..671b2c0 100755 --- a/apps/Discord/uninstall +++ b/apps/Discord/uninstall @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/FreeCAD (precompiled)/install b/apps/FreeCAD (precompiled)/install index b3ff66e..dc4aefb 100755 --- a/apps/FreeCAD (precompiled)/install +++ b/apps/FreeCAD (precompiled)/install @@ -1,13 +1,13 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } # Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" - "${DIRECTORY}/pkg-install" "cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libocct-data-exchange-dev libocct-draw-dev libocct-visualization-dev libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev" "$(dirname "$0")" || exit 1 #download from google drive diff --git a/apps/FreeCAD (precompiled)/uninstall b/apps/FreeCAD (precompiled)/uninstall index 5d44925..98a286f 100755 --- a/apps/FreeCAD (precompiled)/uninstall +++ b/apps/FreeCAD (precompiled)/uninstall @@ -1,11 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } - -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 sudo rm -f $(cat ~/freecad-build/install_manifest.txt) /home/pi/.local/share/applications/org.freecadweb.FreeCAD.desktop || error "failed to remove every installed file!" diff --git a/apps/FreeCAD/install b/apps/FreeCAD/install index ffe22b9..08a99c0 100755 --- a/apps/FreeCAD/install +++ b/apps/FreeCAD/install @@ -1,7 +1,9 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } @@ -11,7 +13,6 @@ if [ "$answer" == 'n' ];then exit 0 fi -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/pkg-install" "cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libocct-data-exchange-dev libocct-draw-dev libocct-visualization-dev libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev" "$(dirname "$0")" || exit 1 wget https://github.com/FreeCAD/FreeCAD/archive/0.18.4.zip || error "failed to download ZIP file!" diff --git a/apps/FreeCAD/uninstall b/apps/FreeCAD/uninstall index 46d158a..830ca52 100755 --- a/apps/FreeCAD/uninstall +++ b/apps/FreeCAD/uninstall @@ -1,11 +1,12 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 sudo rm -f $(cat ~/freecad-build/install_manifest.txt) /home/pi/.local/share/applications/org.freecadweb.FreeCAD.desktop || error "failed to remove every installed file!" diff --git a/apps/Minecraft/install b/apps/Minecraft/install index c1cd67c..abea342 100755 --- a/apps/Minecraft/install +++ b/apps/Minecraft/install @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/Minecraft/uninstall b/apps/Minecraft/uninstall index 5413a58..2fb08d6 100755 --- a/apps/Minecraft/uninstall +++ b/apps/Minecraft/uninstall @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/Pi Power Tools/install b/apps/Pi Power Tools/install index b40c3d2..d6b2f4d 100755 --- a/apps/Pi Power Tools/install +++ b/apps/Pi Power Tools/install @@ -1,12 +1,13 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } # Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/pkg-install" "yad systemd-container xserver-xephyr expect" "$(dirname "$0")" || exit 1 wget -O - https://raw.githubusercontent.com/Botspot/Pi-Power-Tools/master/update | bash diff --git a/apps/Pi Power Tools/uninstall b/apps/Pi Power Tools/uninstall index 1d16c1d..5ec3759 100755 --- a/apps/Pi Power Tools/uninstall +++ b/apps/Pi Power Tools/uninstall @@ -1,11 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } - -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 rm -rf ${HOME}/Pi-Power-Tools ${HOME}/Pi-Power-Tools.old || error "failed on rm step 1!" diff --git a/apps/Raspi2png/install b/apps/Raspi2png/install index a21c57b..6b9debd 100755 --- a/apps/Raspi2png/install +++ b/apps/Raspi2png/install @@ -1,12 +1,12 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" -"${DIRECTORY}/pkg-install" "libpng12-dev" "$(dirname "$0")" || exit 1 +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } +"${DIRECTORY}/pkg-install" "libpng12-dev" "$(dirname "$0")" || exit 1 git clone https://github.com/AndrewFromMelbourne/raspi2png || error "failed to clone repository!" diff --git a/apps/Raspi2png/uninstall b/apps/Raspi2png/uninstall index 8999d1e..a94faea 100755 --- a/apps/Raspi2png/uninstall +++ b/apps/Raspi2png/uninstall @@ -1,7 +1,9 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/TBOPlayer/install b/apps/TBOPlayer/install index bca7134..e1a56b6 100755 --- a/apps/TBOPlayer/install +++ b/apps/TBOPlayer/install @@ -1,12 +1,13 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } # Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/pkg-install" "python-pip python-gobject-2 python-dbus python-tk python-gtk2 python-requests tkdnd" "$(dirname "$0")" || exit 1 cd ~ && wget https://github.com/KenT2/tboplayer/tarball/py2_version -O - | tar xz || error "Failed to download!" diff --git a/apps/TBOPlayer/uninstall b/apps/TBOPlayer/uninstall index 876edce..e23d838 100755 --- a/apps/TBOPlayer/uninstall +++ b/apps/TBOPlayer/uninstall @@ -1,11 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } - -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 #run uninstall script, saying 'yes' to the first question, and 'no' to the second question diff --git a/apps/Windows 10 Theme/install b/apps/Windows 10 Theme/install index 9ad956e..0e5094d 100755 --- a/apps/Windows 10 Theme/install +++ b/apps/Windows 10 Theme/install @@ -1,12 +1,13 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } # Get dependencies -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" "${DIRECTORY}/pkg-install" "xcompmgr tint2 gtk2-engines-murrine" "$(dirname "$0")" || exit 1 git clone https://github.com/Botspot/Windows-10 | error "failed to dowload github repository!" diff --git a/apps/Windows 10 Theme/uninstall b/apps/Windows 10 Theme/uninstall index 87d62a8..cd2d173 100755 --- a/apps/Windows 10 Theme/uninstall +++ b/apps/Windows 10 Theme/uninstall @@ -1,11 +1,11 @@ #!/bin/bash +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" - ~/Windows-10/uninstall | error "failed to uninstall!" rm -rf ~/Windows-10 diff --git a/apps/piKiss/install b/apps/piKiss/install index e82a4e1..d0094ad 100755 --- a/apps/piKiss/install +++ b/apps/piKiss/install @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/piKiss/uninstall b/apps/piKiss/uninstall index eeb0a96..c493227 100755 --- a/apps/piKiss/uninstall +++ b/apps/piKiss/uninstall @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\e[31m$1\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/template/install b/apps/template/install index 15ff546..3837c98 100755 --- a/apps/template/install +++ b/apps/template/install @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\\e[31m$1\\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 } diff --git a/apps/template/uninstall b/apps/template/uninstall index 77297e5..3b7ded4 100755 --- a/apps/template/uninstall +++ b/apps/template/uninstall @@ -1,8 +1,9 @@ #!/bin/bash -DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")" +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + function error { - echo -e "\\e[31m$1\\e[39m" + echo -e "\\e[91m$1\\e[39m" exit 1 }