Skip to content

Commit

Permalink
Confirm before installing the J programming language (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
tom93 committed May 15, 2024
1 parent 9600bdc commit 2f097d0
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions script/install/debootstrap.bash
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,21 @@ chroot "$ISOLATE_ROOT" apt-get install openjdk-11-jdk # Java
chroot "$ISOLATE_ROOT" apt-get install ruby2.2


## INSTALL J
chroot "$ISOLATE_ROOT" mkdir /home/j -p
J_TAG="J803"
J_DEB="j803_amd64.deb"
J_SAVE="/home/j/$J_DEB"
[ -f "$ISOLATE_ROOT/$J_SAVE" ] || {
echo "wget -O \"$ISOLATE_ROOT/$J_SAVE\" https://github.com/NZOI/J-install/releases/download/$J_TAG/$J_DEB"
wget -O "$ISOLATE_ROOT/$J_SAVE" "https://github.com/NZOI/J-install/releases/download/$J_TAG/$J_DEB"
}

echo "$chroot_cmd dpkg -i $J_SAVE"
chroot "$ISOLATE_ROOT" dpkg -i "$J_SAVE"

cat << EOF > "$ISOLATE_ROOT"/home/j/install.ijs
# install J
bash script/confirm.bash 'Install J' && {
chroot "$ISOLATE_ROOT" mkdir /home/j -p
J_TAG="J803"
J_DEB="j803_amd64.deb"
J_SAVE="/home/j/$J_DEB"
[ -f "$ISOLATE_ROOT/$J_SAVE" ] || {
echo "wget -O \"$ISOLATE_ROOT/$J_SAVE\" https://github.com/NZOI/J-install/releases/download/$J_TAG/$J_DEB"
wget -O "$ISOLATE_ROOT/$J_SAVE" "https://github.com/NZOI/J-install/releases/download/$J_TAG/$J_DEB"
}

echo "$chroot_cmd dpkg -i $J_SAVE"
chroot "$ISOLATE_ROOT" dpkg -i "$J_SAVE"

cat << EOF > "$ISOLATE_ROOT"/home/j/install.ijs
load 'pacman'
'update' jpkg ''
'install' jpkg 'format/printf'
Expand All @@ -168,9 +169,10 @@ load 'pacman'
exit 0
EOF

echo "$chroot_cmd ijconsole /home/j/install.ijs"
chroot "$ISOLATE_ROOT" ijconsole /home/j/install.ijs
## END INSTALL J
echo "$chroot_cmd ijconsole /home/j/install.ijs"
chroot "$ISOLATE_ROOT" ijconsole /home/j/install.ijs
}
# end install J

}

Expand Down

0 comments on commit 2f097d0

Please sign in to comment.