Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
improve scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 29, 2015
1 parent 974de7a commit cc04a44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
7 changes: 6 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

if [ -d "uno-zen" ]; then
echo "\nUno Zen is already installed. Maybe you want to update? Run:"
echo "\nsh scripts/update.sh"
exit
fi

git clone https://github.com/Kikobeats/uno-zen.git && cd uno-zen

Expand All @@ -17,4 +22,4 @@ echo "Creating a stable branch from the latest tagged version"
git checkout "$latestTag"
git checkout -b stable

echo "Theme Installed Successful! Enjoy :-)"
echo "\nTheme Installed Successful! Enjoy :-)"
14 changes: 6 additions & 8 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

welcome

currentVersion=$(git describe)
echo " Your current version is $currentVersion."
currentVersion=$(git describe --tags "$(git rev-list --tags --max-count=1)")
echo "Current version: $currentVersion."

echo " Searching for updates..."
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."
if [ "$currentVersion" == "$latestTag" ]; then
echo "\nYou already have the latest version."
else
echo " Updating $currentVersion to $latestTag..."
echo "\nUpdating $currentVersion to $latestTag..."
git merge "$latestTag"

fi

0 comments on commit cc04a44

Please # to comment.