Skip to content

Commit 4ddb30a

Browse files
committed
Add extra variable to change branch
1 parent 5b1453c commit 4ddb30a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: install_kiri.sh

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CR=$(tput sgr0) # Color Reset
1313

1414
export KIRI_INSTALL_PATH
1515
export KIRI_HOME
16+
export KIRI_BRANCH
1617

1718
install_kiri()
1819
{
@@ -25,6 +26,7 @@ install_kiri()
2526
if which git &> /dev/null; then
2627
git clone --recurse-submodules -j8 https://github.com/leoheck/kiri.git "${KIRI_HOME}/kiri"
2728
cd "${KIRI_HOME}/kiri/" || exit
29+
git checkout ${KIRI_BRANCH}
2830
else
2931
echo "Git is missing, please use install_dependencies script"
3032
exit 1
@@ -97,12 +99,18 @@ show_initial_message()
9799
KIRI_HOME="${HOME}/.local/share"
98100
fi
99101

102+
if [[ -n "${KIRI_BRANCH}" ]]; then
103+
KIRI_BRANCH="main"
104+
fi
105+
100106
read -r -d '' ENV_SETUP_NOTE <<-EOM
101107
${CI}${CB}Installing KiRI${CR}
102108
103109
Installation path ${KIRI_HOME}
104110
Change it using KIRI_INSTALL_PATH environment variable
105111
112+
KIRI_BRANCH variable can be used to test other branches of Kiri
113+
106114
Hit ENTER to continue or Ctrl+C to leave.
107115
EOM
108116

0 commit comments

Comments
 (0)