Skip to content

Commit e22e27a

Browse files
committed
Pass Version arg in install script
1 parent 7528444 commit e22e27a

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

scripts/install.sh

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
#!/bin/bash
22

3+
while getopts "v:" opt; do
4+
case $opt in
5+
v) version="$OPTARG"
6+
;;
7+
\?) echo "Invalid option -$OPTARG" >&2
8+
exit 1
9+
;;
10+
esac
11+
12+
case $OPTARG in
13+
-*) echo "Option $opt needs a valid argument"
14+
exit 1
15+
;;
16+
esac
17+
done
18+
19+
if [[ -z $version ]]; then
20+
echo "Please provide version using '-v'";
21+
exit 1
22+
fi
23+
24+
VERSION=$version
25+
326
# set +e to prevent quilt from exiting when no patches popped
427
set +e
528

@@ -12,7 +35,7 @@ quilt pop -a
1235
rm -rf .pc
1336

1437
# empty vscode module
15-
printf "\n======== Delete data is vs code module if present ========\n"
38+
printf "\n======== Delete data in vs code module if present ========\n"
1639
rm -rf ${PROJ_ROOT}/vscode/.
1740

1841
# re-enable -e to allow exiting on error
@@ -47,7 +70,7 @@ sh ${PROJ_ROOT}/scripts/postinstall.sh
4770

4871
# Build tarball for conda feedstock from vscode dir
4972
printf "\n======== Build Tarball for Conda Feedstock ========\n"
50-
bash ${PROJ_ROOT}/scripts/create_code_editor_tarball.sh -v 1.2.0
73+
bash ${PROJ_ROOT}/scripts/create_code_editor_tarball.sh -v ${VERSION}
5174

5275
# Copy resources
5376
printf "\n======== Copy resources ========\n"

0 commit comments

Comments
 (0)