[O] Install and update script (#4)

This commit is contained in:
2026-05-03 13:20:22 -04:00
committed by GitHub
parent 8334026e89
commit d39f910fae
2 changed files with 54 additions and 19 deletions
+2 -8
View File
@@ -7,8 +7,8 @@ if [ -d "zshrc" ]; then
exit -1
fi
# Clone repo
git clone "https://github.com/hykilpikonna/zshrc"
# Clone repo without downloading old history.
git clone --depth 1 --recurse-submodules --shallow-submodules "https://github.com/hykilpikonna/zshrc"
# Addline function: add a line to a file if the line doesn't already exist
addline() {
@@ -19,12 +19,6 @@ addline() {
addline .zshrc 'SCR="$HOME/zshrc/scripts"'
addline .zshrc '. $SCR/zshrc.sh'
# Initialize submodules
pushd zshrc
git submodule init
git submodule update
popd
# Return to the previous directory
popd