Fixed the git fetch --tags issue.
authorrohit <rohit>
Sat, 24 Mar 2018 00:42:07 +0000 (00:42 +0000)
committerrohit <rohit>
Sat, 24 Mar 2018 00:42:07 +0000 (00:42 +0000)
wrapfs-fix-branch.sh

index 1a8d2ff92bfb66aeae614368c29d4e8b3c6f469a..7dc6e3dde1d042ac4d84ff629c7d0e4cc8c8b264 100755 (executable)
@@ -47,12 +47,22 @@ case "$WRAPFS_DIR" in
     wrapfs-2.* | wrapfs-3.* | wrapfs-4.* ) 
        LINUX_REPO="stable/linux-stable.git"
         LINUX_BRANCH=$(echo $WRAPFS_DIR | sed s/wrapfs/linux/g)
+
+        # make sure it ends with *.y.git
+        if [[ "$LINUX_BRANCH" != *".y" ]]; then
+            LINUX_BRANCH="$LINUX_BRANCH.y"
+        fi
        ;;
     * )
         echo "Please run the script in a wrapfs git repository."
         exit 1
 esac
 
+# make sure it ends with *.y.git
+if [[ "$WRAPFS_REPO" != *".y" ]]; then
+    WRAPFS_REPO=$(echo $WRAPFS_REPO | sed s/git/y.git/g)
+fi
+
 runcmd git config merge.renameLimit 999999
 
 # check if remote already exists