Browse Source

scripts: use glide update if repo exists in glide.lock

Anthony Romano 9 years ago
parent
commit
de58a9c733
1 changed files with 8 additions and 1 deletions
  1. 8 1
      scripts/updatedep.sh

+ 8 - 1
scripts/updatedep.sh

@@ -44,7 +44,14 @@ popd
 
 if [ -n "$1" ]; then
 	echo "glide get on $(echo $1)"
-	glide get --strip-vendor $1
+	matches=`grep "name: $1" glide.lock`
+	if [ ! -z "$matches" ]; then
+		echo "glide update on $1"
+		glide update --strip-vendor $1
+	else
+		echo "glide get on $1"
+		glide get --strip-vendor $1
+	fi
 else
 	echo "glide update on *"
 	glide update --strip-vendor