Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup, convert if/elif/else to case

  • Loading branch information...
commit 97be96c8c3c25ab2af8d28118ecf51fb49a3f43a 1 parent 7397daa
@richo richo authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 pull_ext.sh
View
15 pull_ext.sh
@@ -26,19 +26,24 @@ pull_or_clone()
RCS="$1"; shift
# Define RCS Data:
- if [ $RCS = "svn" ]; then
+ case $RCS in
+ "svn")
CHECKOUT=checkout
PULL=update
- elif [ $RCS = "git" ]; then
+ ;;
+ "git")
CHECKOUT=clone
PULL=pull
- elif [ $RCS = "hg" ]; then
+ ;;
+ "hg")
CHECKOUT=clone
PULL=pull
- else
+ ;;
+ *)
echo "Broken RCS @ $IPATH"
continue
- fi
+ ;;
+ esac
COPATH="$GITPATH"/"$IPATH"
Please sign in to comment.
Something went wrong with that request. Please try again.