Browse files

Update sync.sh

not sure if this is really an improvement, now it does not need bash and does not use [ ]
  • Loading branch information...
1 parent ec58f84 commit 378e4d9d2291faafa07e3378f0d679955e32eca5 @VisualPrankDude VisualPrankDude committed with Feb 24, 2014
Showing with 5 additions and 6 deletions.
  1. +5 −6 sys/sync.sh
View
11 sys/sync.sh
@@ -1,8 +1,7 @@
-#!/bin/bash
+#!/bin/sh
-git remote | grep upstream &> /dev/null
-if [ $? -ne 0 ]; then
- git remote add upstream https://github.com/radare/radare2.git
+if ! git remote | grep upstream > /dev/null
+then
+ git remote add upstream https://github.com/radare/radare2.git
fi
-git fetch upstream
-git rebase --onto master upstream/master
+test -d radare2 && git fetch upstream && git rebase --onto master upstream/master

0 comments on commit 378e4d9

Please sign in to comment.