diff options
author | Leandro Heck | 2015-11-05 22:46:03 -0200 |
---|---|---|
committer | Leandro Heck | 2015-11-05 22:46:03 -0200 |
commit | 83f98f4448b13da3bee228b7fcb8efae5f3a5c4e (patch) | |
tree | 033177a7194b64d5a701b2d262a6fd87753fbec1 /arc-theme-upgrade | |
parent | 3d548a1fd423c40a1b21dd65ec53643129761552 (diff) | |
download | solarc-theme-83f98f4448b13da3bee228b7fcb8efae5f3a5c4e.tar.gz solarc-theme-83f98f4448b13da3bee228b7fcb8efae5f3a5c4e.tar.xz solarc-theme-83f98f4448b13da3bee228b7fcb8efae5f3a5c4e.zip |
Adding a question to install the script
Diffstat (limited to 'arc-theme-upgrade')
-rwxr-xr-x | arc-theme-upgrade | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arc-theme-upgrade b/arc-theme-upgrade index 9558f82..ed58430 100755 --- a/arc-theme-upgrade +++ b/arc-theme-upgrade @@ -91,6 +91,24 @@ install_theme() { ./autogen.sh --prefix=/usr 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/ + ;; + *) + echo "Aborted by user" + exit 0; + ;; + esac + else + echo "Upgrading the $(basename $0)" + cp -f $(basename $0) /usr/bin/ + fi + # Remove the sources rm -rf $tempdir @@ -124,4 +142,4 @@ case $response in echo "Aborted by user" exit 0; ;; -esac
\ No newline at end of file +esac |