Fixed master branch to have only linux code base and teeing debug logs to log file.
authorrohit <rohit>
Fri, 23 Mar 2018 20:09:32 +0000 (20:09 +0000)
committerrohit <rohit>
Fri, 23 Mar 2018 20:09:32 +0000 (20:09 +0000)
wrapfs-fix-branch.sh

index b8e688f1357b9279e7dcd0d9074c092209a9bea1..1a8d2ff92bfb66aeae614368c29d4e8b3c6f469a 100755 (executable)
@@ -29,12 +29,12 @@ LINUX_BRANCH="master"
 LOG_FILE="/tmp/log-${WRAPFS_DIR}"
 
 runcmd() {
-    echo "----------------------------------------------------------------------"
-    echo "CMD: $@"
-    $@
+    echo "----------------------------------------------------------------------" 2>&1 | tee -a $LOG_FILE
+    echo "CMD: $@" 2>&1 | tee -a $LOG_FILE
+    $@ 2>&1 | tee -a $LOG_FILE
     ret=$?
     if [ $ret -ne 0 ] ; then
-        echo "ERROR in running cmd: $@"
+        echo "ERROR in running cmd: $@" | tee -a $LOG_FILE
        exit $ret
     fi
 }
@@ -43,8 +43,6 @@ case "$WRAPFS_DIR" in
     wrapfs-latest)
        LINUX_REPO="torvalds/linux.git"
         LINUX_BRANCH="master"
-        #echo $LINUX_PREFIX/$LINUX_REPO
-        #echo $WRAPFS_PREFIX/$WRAPFS_REPO
        ;;
     wrapfs-2.* | wrapfs-3.* | wrapfs-4.* ) 
        LINUX_REPO="stable/linux-stable.git"
@@ -56,6 +54,7 @@ case "$WRAPFS_DIR" in
 esac
 
 runcmd git config merge.renameLimit 999999
+
 # check if remote already exists
 if `git remote | egrep -q ^wrapfs` ; then
     echo "git remote wrapfs already exists"
@@ -74,4 +73,3 @@ runcmd git branch wrapfs -u wrapfs/master
 runcmd git remote set-url origin $LINUX_PREFIX/$LINUX_REPO
 runcmd git fetch --tags origin
 runcmd git reset --hard origin/$LINUX_BRANCH
-runcmd git merge wrapfs