From 0dfb6b251cf5ab86794751001106775646b53aa4 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Mon, 28 Sep 2015 22:30:36 +0200 Subject: [PATCH] adjust scripts --- scripts/install.sh | 6 ++++++ scripts/update.sh | 20 ++++++++++++++++++++ scripts/utils.sh | 11 +++++++++++ 3 files changed, 37 insertions(+) create mode 100644 scripts/utils.sh diff --git a/scripts/install.sh b/scripts/install.sh index f70b6817..da146572 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,5 +1,9 @@ #!/bin/bash +. "$PWD"/utils.sh + +welcome + git clone https://github.com/Kikobeats/uno-zen.git && cd uno-zen echo "Getting the repository tagged commits" @@ -11,3 +15,5 @@ latestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") echo "Creating a stable branch from the latest tagged version" git checkout "$latestTag" git checkout -b stable + +echo "Theme Installed Successful! Enjoy :-)" diff --git a/scripts/update.sh b/scripts/update.sh index a9bf588e..c092e872 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -1 +1,21 @@ #!/bin/bash + +. "$PWD"/scripts/utils.sh + +welcome + +currentVersion=$(git describe) +echo " Your current version is $currentVersion." + +echo " Searching for updates..." +git fetch --tags origin +latestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") + +if [ "$currentVersion" == "$latestTag" ] +then + echo "\n You already have the latest version." +else + echo " Updating $currentVersion to $latestTag..." + git merge "$latestTag" + +fi diff --git a/scripts/utils.sh b/scripts/utils.sh new file mode 100644 index 00000000..30b94d74 --- /dev/null +++ b/scripts/utils.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +function welcome() { + echo ' _ _ _ _ _____ ______ _____ _ _' + echo '| | | || \ | || _ | |___ /| ___|| \ | |' + echo '| | | || \| || | | | / / | |__ | \| |' + echo '| | | || . ` || | | | / / | __| | . ` |' + echo '| |_| || |\ |\ \_/ / ./ /___| |___ | |\ |' + echo ' \___/ \_| \_/ \___/ \_____/\____/ \_| \_/' + echo +}