summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-06-25 19:04:30 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-06-25 19:04:30 +0200
commitc052029267ba4988e50bd45a85a27dd5f1fb01de (patch)
tree5f3df73c9d2dbdd8be434796136826fc7e176eb8
parent0669b923c0ae82408112864c47667908e34d346a (diff)
downloadyoutube-dl-c052029267ba4988e50bd45a85a27dd5f1fb01de.tar.gz
youtube-dl-c052029267ba4988e50bd45a85a27dd5f1fb01de.tar.xz
youtube-dl-c052029267ba4988e50bd45a85a27dd5f1fb01de.zip
Add an error message if number of arguments is incorrect
-rwxr-xr-xupdate_latest.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/update_latest.sh b/update_latest.sh
index 66a3e9999..2b1c597ec 100755
--- a/update_latest.sh
+++ b/update_latest.sh
@@ -3,6 +3,11 @@ set -e
 
 version="$1"
 
+if [ -z "$version" ]; then
+	echo "Usage: $0 version"
+	exit 1
+fi
+
 ln -sf ../downloads/$version latest/directory
 for f in $(ls "downloads/$version/"); do \
     ln -sf "../downloads/$version/$f" latest/$(echo $f | sed -e "s@-$version@@")