Commit a6cffca

mo khan <mo@mokhan.ca>
2021-06-28 18:45:39
feat: install list of packages when codespace is launched
1 parent 7b5c34e
Changed files (1)
install.sh
@@ -28,6 +28,15 @@ function dotfile()
   ln -sfn "$source" "$destination"
 }
 
+function install_pkgs()
+{
+  if [[ -n $CODESPACES ]]; then
+    apt-get update -y
+    # shellcheck disable=SC2046
+    apt-get install -y --no-install-recommends $(tr '\n' ' ' < ./apt.list)
+  fi
+}
+
 mkdir -p "$HOME/.config" "$HOME/.local/bin" "$HOME/.local/share"
 
 dotfile "ackrc"
@@ -44,3 +53,5 @@ dotfile "profile"
 dotfile "ssh/config"
 dotfile "vimrc"
 dotfile "wgetrc"
+
+install_pkgs