Actualización

This commit is contained in:
perro tuerto 2023-06-18 10:32:58 -07:00
parent 2e8f0b1864
commit 2421212292
1 changed files with 9 additions and 4 deletions

View File

@ -296,15 +296,20 @@ aliases () {
fi
;;
empujar | push)
repo=$(parent $RLOC_ALIAS)
if [ -f "$RLOC_ALIAS" ]; then
if [ -f "$OZSH_ALIAS" ] &&[ ! -L "$OZSH_ALIAS" ]; then
if [ -f "$OZSH_ALIAS" ] && [ ! -L "$OZSH_ALIAS" ]; then
cp -u $OZSH_ALIAS $RLOC_ALIAS
elif [ -f "$BASH_ALIAS" ] && [ ! -L "$BASH_ALIAS" ]; then
cp -u $BASH_ALIAS $RLOC_ALIAS
fi
git -C $(parent $RLOC_ALIAS) add .
git -C $(parent $RLOC_ALIAS) commit -m "Actualización"
git -C $(parent $RLOC_ALIAS) pushall
if output=$(git -C $repo status --porcelain) && [ ! -z "$output" ]; then
git -C $repo add .
git -C $repo commit -m "Actualización"
fi
git -C $repo pushall
unset output
unset repo
recargar
else
echo-error "no se pudo empujar al repositorio; no existe el archivo '$RLOC_ALIAS'"