Przeglądaj źródła

If vscode exists, fetch updates (#19)

Ruslan Gainutdinov 6 lat temu
rodzic
commit
606d3f8ff2
2 zmienionych plików z 10 dodań i 3 usunięć
  1. 1 0
      .gitignore
  2. 9 3
      get_repo.sh

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+vscode

+ 9 - 3
get_repo.sh

@@ -1,8 +1,14 @@
 #!/bin/bash
 
-git clone https://github.com/Microsoft/vscode.git
-cd vscode
+if [ -d vscode ]; then
+  cd vscode 
+  git fetch --all
+else
+  git clone https://github.com/Microsoft/vscode.git
+  cd vscode
+fi
+
 export LATEST_MS_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
 echo "Got the latest MS tag: ${LATEST_MS_TAG}"
 git checkout $LATEST_MS_TAG
-cd ..
+cd ..