Skip to content

Commit

Permalink
ucc: fix update function
Browse files Browse the repository at this point in the history
  • Loading branch information
uditkarode committed Nov 25, 2018
1 parent 03ed1d3 commit 8b0c406
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ucc --workspace /Users/udit/myProjects
```bash
cd ~
mkdir UCCRoot && cd UCCRoot
ucc --init .
ucc init
ucc --workspace .
```

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ucc --workspace /Users/udit/myProjects
```bash
cd ~
mkdir UCCRoot && cd UCCRoot
ucc --init .
ucc init
ucc --workspace .
```

Expand Down
2 changes: 1 addition & 1 deletion docs/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0
2.1
10 changes: 5 additions & 5 deletions ucc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m'
ROOT_FILE=~/.__ucc_ws
VERSION='2.0'
VERSION='2.1'

#We need the dependencies pre-installed
function check_installed() {
Expand Down Expand Up @@ -87,10 +87,10 @@ case "$#" in
;;

"-u"|"--update")
if [ ! $(curl -i https://uditkarode.github.io/ucc/version) == ${VERSION} ]; then
if [ ! "$(curl -i https://uditkarode.github.io/ucc/version)" == ${VERSION} ]; then
if [ "$EUID" -ne 0 ]; then
echo -e "${YELLOW}INFO: The update function needs root privileges.${NC}"
sudo echo "Privileges granted."
echo -e "${YELLOW}INFO: The update function needs superuser privileges.${NC}"
sudo echo "Superuser privileges granted."
fi
cd /tmp
if [ -f "/tmp/ucc" ]; then
Expand Down Expand Up @@ -121,7 +121,7 @@ case "$#" in

git clone https://github.com/uditkarode/ucc.git
mv ucc/BIN .
rm -r ucc
rm -rf ucc
mkdir builds logs files sources
echo -e "${GREEN}Folder is ready for use as workspace!${NC}"
;;
Expand Down

0 comments on commit 8b0c406

Please sign in to comment.