From c052029267ba4988e50bd45a85a27dd5f1fb01de Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Tue, 25 Jun 2013 19:04:30 +0200 Subject: [PATCH] Add an error message if number of arguments is incorrect --- update_latest.sh | 5 +++++ 1 file changed, 5 insertions(+) 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@@")