remove submodules and add autoupdate

This commit is contained in:
quackerd 2021-03-08 05:24:23 -05:00
parent e0489507d6
commit 13718f4d8a

View File

@ -10,7 +10,7 @@ export OZSH_LASTUPDATE_FILE="$OZSH_HOME/last_update"
function ozsh_clone_plugin { function ozsh_clone_plugin {
if [ ! -d "$OZSH_MODULES/$1" ]; then if [ ! -d "$OZSH_MODULES/$1" ]; then
echo "Installing plugin $1..." echo "Installing plugin $1..."
git -C "$OZSH_MODULES" clone "$2" "$1" > /dev/null 2>&1 git -C "$OZSH_MODULES" clone "$2" "$1"
fi fi
} }
@ -37,13 +37,14 @@ function ozsh_load {
function ozsh_update { function ozsh_update {
git -C $OZSH_HOME stash git -C $OZSH_HOME stash
git -C $OZSH_HOME pull git -C $OZSH_HOME pull --rebase
git -C $OZSH_HOME stash pop git -C $OZSH_HOME stash pop
# check for updates in modules # check for updates in modules
for d in $OZSH_MODULES/*/ ; for d in $OZSH_MODULES/*/ ;
do do
git -C $d pull echo "Updating $d..."
git -C $d pull --rebase
done done
echo $(date) > "$OZSH_LASTUPDATE_FILE" echo $(date) > "$OZSH_LASTUPDATE_FILE"