From 606d3f8ff26474889a1e0f7bafa0a497c644eb85 Mon Sep 17 00:00:00 2001 From: Ruslan Gainutdinov Date: Thu, 20 Sep 2018 16:32:49 +0300 Subject: [PATCH] If vscode exists, fetch updates (#19) --- .gitignore | 1 + get_repo.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b86f26 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vscode diff --git a/get_repo.sh b/get_repo.sh index acf5527..ee03a07 100755 --- a/get_repo.sh +++ b/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 .. \ No newline at end of file +cd ..