From c45c7f49f313ec63f6df7774ffcf1c914319b10b Mon Sep 17 00:00:00 2001 From: Juni Kim Date: Thu, 16 Feb 2023 20:18:53 -0500 Subject: [PATCH] nfs --- install_alpine.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install_alpine.sh b/install_alpine.sh index 740abf6..3d0970f 100755 --- a/install_alpine.sh +++ b/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