Skip to content

Commit 10fa04b

Browse files
Try to parameterize the linux script
1 parent 0dc2199 commit 10fa04b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

update_cache_linux.sh

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

3-
[ $# -eq 0 ] && { echo "Usage: $0 <full path to APPLICATION checkout>"; exit 1; }
3+
UBUNTU_VERSION="18.04"
4+
5+
[ $# -eq 0 ] && { echo "Usage: $0 <full path to APPLICATION checkout> <version>"; exit 1; }
6+
7+
[ $# -eq 2 ] && UBUNTU_VERSION="$2"
48

59
confirm() {
610
read -r -p "${1:-Are you sure? [y/N]} " response
@@ -37,7 +41,7 @@ export CONAN_SYSREQUIRES_MODE=enabled
3741

3842
header "Prepare Cache for update"
3943

40-
confirm "Clean cache? [y/N]" && cd ${CONAN_USER_HOME} && git clean -df && git checkout . && git checkout host-Linux-target-Linux-ubuntu-18.04-master
44+
confirm "Clean cache? [y/N]" && cd ${CONAN_USER_HOME} && git clean -df && git checkout . && git checkout host-Linux-target-Linux-ubuntu-${UBUNTU_VERSION}-master
4145

4246
confirm "Update cache? [y/N]" && cd ${CONAN_USER_HOME} && git pull && git lfs pull
4347

update_cache_ubuntu_16_04.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
UBUNTU_VERSION="16.04"
4+
5+
[ $# -eq 0 ] && { echo "Usage: $0 <full path to APPLICATION checkout>"; exit 1; }
6+
7+
./update_cache_linux.sh "$1" "$UBUNTU_VERSION"

0 commit comments

Comments
 (0)