Juni Kim 2 years ago
parent
commit
c45c7f49f3
  1. 16
      install_alpine.sh

16
install_alpine.sh

@ -42,6 +42,7 @@ user_setup() {
Options:
-F,--nfs install aliases for connecting to nases
-G,--graphical install xorg and wm
-N,--nvim install neovim
-C,--cp install competitive programming scripts
@ -51,6 +52,7 @@ EOF
GRAPHICAL=
CP=
NVIM=
NFS=
while test $# -ne 0; do
case $1 in
-G|--graphical)
@ -62,6 +64,9 @@ EOF
-N|--nvim)
NVIM=1
;;
-F|--nfs)
NFS=1
;;
*)
echo "invalid option $1"
help_text
@ -152,6 +157,14 @@ EOF
go install git.junickim.me/junikimm717/cpgo@latest
}
nfs() {
doas apk add nfs-utils samba cifs-utils
mkdir -p "$HOME/nfs/rpi" && mkdir -p "$HOME/nfs/d2"
echo 'export WORKSPACES=$HOME/nfs/rpi/ohsg11/s2:$HOME/nfs/d2/ohsg11/s2:$WORKSPACES' >> ~/.zshrc
echo "alias schoolmount=\'sudo mount 192.168.1.34:/srv/nfs ~/nfs/rpi\'" >> ~/.zshrc
echo "alias d2mount=\'sudo mount.cifs //157.245.86.196/d2nas ~/nfs/d2\'" >> ~/.zshrc
}
graphical() {
# xorg and drivers
doas setup-xorg-base
@ -197,6 +210,9 @@ EOF
if ! test -z "$GRAPHICAL"; then
graphical || exit 1
fi
if ! test -z "$NFS"; then
nfs || exit 1
fi
}
if test $# -eq 0; then

Loading…
Cancel
Save