-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from cniethammer/fix-missing-version-options
Add missing --version option to the python and bash based ws commands
- Loading branch information
Showing
4 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
# A workaround to update permissions is to unshare and re-share the workspace | ||
# with the users. | ||
# | ||
# Copyright(c) 2021 Christoph Niethammer <[email protected]> | ||
# Copyright(c) 2021-2024 Christoph Niethammer <[email protected]> | ||
# | ||
|
||
progname=$(basename $0) | ||
|
@@ -27,6 +27,10 @@ if [[ $? -ne 4 ]]; then | |
exit 1 | ||
fi | ||
|
||
function print_version() { | ||
echo "workspace version 1.5.0" | ||
} | ||
|
||
function usage() { | ||
cat <<EOF | ||
$progname allows to share an existing workspace with other users. | ||
|
@@ -44,14 +48,15 @@ Users that were granted read access to a workspace (WS_NAME) can be listed with | |
options: | ||
-F, --filesystem ws filesystem | ||
-h, --help show this help | ||
--version show version information and exit | ||
EOF | ||
} | ||
|
||
|
||
# parse command line, based on example provided by util-linux | ||
OPTIONS=F:h | ||
LONG_OPTIONS=filesystem:,help | ||
LONG_OPTIONS=filesystem:,help,version | ||
PARSED=$(getopt --options=$OPTIONS --longoptions=$LONG_OPTIONS --name "$0" -- "$@") | ||
if [[ $? -ne 0 ]]; then | ||
echo "Error: Command line error" | ||
|
@@ -72,6 +77,10 @@ while true; do | |
FILESYSTEM="$2" | ||
shift 2 | ||
;; | ||
--version) | ||
print_version | ||
exit 0 | ||
;; | ||
--) | ||
shift | ||
break | ||
|