소스 검색

Merge pull request #197 from twiest/pr

added --list-host-types option to opscp
Thomas Wiest 10 년 전
부모
커밋
ec9ee11980
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      bin/opscp

+ 5 - 0
bin/opscp

@@ -15,6 +15,7 @@ Options:
   -e ENV, --env ENV     Which environment to use
   -e ENV, --env ENV     Which environment to use
   -t HOST_TYPE, --host-type HOST_TYPE
   -t HOST_TYPE, --host-type HOST_TYPE
                         Which host type to use
                         Which host type to use
+  --list-host-types     List all of the host types
   -O OPTION, --option=OPTION
   -O OPTION, --option=OPTION
                         SSH option (OPTIONAL)
                         SSH option (OPTIONAL)
   -v, --verbose         turn on warning and diagnostic messages (OPTIONAL)
   -v, --verbose         turn on warning and diagnostic messages (OPTIONAL)
@@ -63,6 +64,10 @@ while [ $# -gt 0 ] ; do
     USER=$1
     USER=$1
     shift # get past the value of the option
     shift # get past the value of the option
 
 
+  elif [ "$1" == "--list-host-types" ] ; then
+    ohi --list-host-types
+    exit 0
+
   elif [ "$1" == "-h" -o "$1" == "--hosts" -o "$1" == "-H" -o "$1" == "--host" ] ||
   elif [ "$1" == "-h" -o "$1" == "--hosts" -o "$1" == "-H" -o "$1" == "--host" ] ||
        [ "$1" == "-o" ] ; then
        [ "$1" == "-o" ] ; then
     echo "ERROR: unknown option $1"
     echo "ERROR: unknown option $1"