aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Heck2015-11-05 22:52:33 -0200
committerLeandro Heck2015-11-05 22:52:33 -0200
commit05be1c125f4660fc5a1b3ee564895a593fbed28d (patch)
treeddd835898190748d643e3310f298f60280bd3578
parent83f98f4448b13da3bee228b7fcb8efae5f3a5c4e (diff)
downloadsolarc-theme-05be1c125f4660fc5a1b3ee564895a593fbed28d.tar.gz
solarc-theme-05be1c125f4660fc5a1b3ee564895a593fbed28d.tar.xz
solarc-theme-05be1c125f4660fc5a1b3ee564895a593fbed28d.zip
Minor improvments
-rwxr-xr-xarc-theme-upgrade33
1 files changed, 18 insertions, 15 deletions
diff --git a/arc-theme-upgrade b/arc-theme-upgrade
index ed58430..1bf2d8c 100755
--- a/arc-theme-upgrade
+++ b/arc-theme-upgrade
@@ -92,25 +92,28 @@ install_theme() {
make install
# Install this script
- if [ ! -f /usr/bin/$(basename $0) ]; then
- echo
- read -r -p "Do you like to install the $(basename $0) for future upgrades? [y/N] " response
- case $response in
- [yY][eE][sS]|[yY])
- cp -r arc-theme-upgrade /usr/bin/
+ if [ -f $(basename $0) ]; then
+ if [ ! -f /usr/bin/$(basename $0) ]; then
+ echo
+ read -r -p "Do you like to install the $(basename $0) for future upgrades? [y/N] " response
+ case $response in
+ [yY][eE][sS]|[yY])
+ echo "Installing $(basename $0) on /usr/bin/"
+ cp -r arc-theme-upgrade /usr/bin/
+ ;;
+ *)
+ echo "Aborted by user"
+ exit 0;
;;
- *)
- echo "Aborted by user"
- exit 0;
- ;;
- esac
- else
- echo "Upgrading the $(basename $0)"
- cp -f $(basename $0) /usr/bin/
+ esac
+ else
+ echo "Upgrading $(basename $0)"
+ cp -f $(basename $0) /usr/bin/
+ fi
fi
# Remove the sources
- rm -rf $tempdir
+ # rm -rf $tempdir
echo
echo "Installation complete."