-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add v2 backwards compatibility shell scripts for automation purposes
- Loading branch information
1 parent
60e2957
commit ec0bef1
Showing
10 changed files
with
144 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
function arg_conversion { | ||
args=("$@") | ||
|
||
# Initialize an empty array to hold the modified arguments | ||
modified_args=() | ||
|
||
for arg in "${args[@]}" | ||
do | ||
# Check if the argument starts with a single hyphen and is not a double hyphen | ||
if [[ $arg == -[!-]* ]]; then | ||
# Modify the argument to start with a double hyphen | ||
modified_args+=(--"${arg:1}") | ||
else | ||
# Add the argument as is | ||
modified_args+=("$arg") | ||
fi | ||
done | ||
|
||
echo "${modified_args[@]}" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetArchiver "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetCleaner "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetGetProposal "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetIngestor "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetPublishData "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetPublishDataRetrieve "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli datasetRetriever "${modified_args[@]}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# shellcheck source=/dev/null | ||
source "$SCRIPT_DIR"/argconverter.sh | ||
|
||
modified_args=$(arg_conversion "$@") | ||
|
||
# Call `echo` with the modified arguments | ||
"$SCRIPT_DIR"/scicat-cli waitForJobFinished "${modified_args[@]}" |