Skip to content

Commit a59290d

Browse files
committed
chore: use option to defined sdk directory
1 parent 8f14ed0 commit a59290d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

scripts/replace.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22
# Add replace directives to local files to go.work
33
set -eo pipefail
44

5-
if [ -d $1 ]; then
6-
SDK_DIR=$1
7-
shift
8-
fi
5+
while getopts "s:" option; do
6+
case "${option}" in
7+
s)
8+
SDK_DIR=${OPTARG}
9+
;;
10+
11+
*)
12+
echo "call: $0 [-s sdk-dir] <apis*>"
13+
exit 0
14+
;;
15+
esac
16+
done
17+
shift $((OPTIND-1))
918

1019
if [ -z "$SDK_DIR" ]; then
1120
SDK_DIR=../stackit-sdk-generator/sdk-repo-updated

0 commit comments

Comments
 (0)