1
0
Fork 0

Autocommitted updated scripts from costadelsol

main
Mari 4 years ago
parent 2400b7d3b3
commit afe9dc6f71
  1. 3
      bash_aliases.sh
  2. 8
      install.sh

@ -48,14 +48,13 @@ function copy_func()
}
function sync_git_only()
{
(
cd "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"
if git add . && ! git diff-index --cached --quiet HEAD; then
git commit -am "Autocommitted updated scripts from $(hostname)"
fi
git pull --rebase
git submodule update --init --recursive
./install.sh
if ! git --no-pager diff --exit-code origin/master master; then
git --no-pager log --reverse origin/master..master
if ! read -p "OK to push these changes? (Y/N) " -N 1 confirm; then

@ -27,9 +27,13 @@ if [[ -z "$1" ]]; then
chmod -R u=rwX,g=,o= "$dir"
chmod 600 "$dir"/ssh/authorized_keys
elif [[ "$1" == "link" ]]; then
ln --symbolic -T "$hostdir/$relpath" ~/"$relpath"
if [[ "$(readlink ~/"$relpath")" != "$hostdir/$relpath" ]]; then
ln --symbolic -v -T "$hostdir/$relpath" ~/"$relpath"
fi
elif [[ "$1" == "mkdir" ]]; then
mkdir -p ~/"$relpath"
if [[ ! -d ~/"$relpath" ]]; then
mkdir -vp ~/"$relpath"
fi
else
echo "unknown command $1"
fi

Loading…
Cancel
Save