homeinit: Fix git updates and install Guix manifest

master
Pierre Neidhardt 2018-05-18 12:32:48 +02:00
parent ae03530323
commit a96e3e7831
1 changed files with 16 additions and 7 deletions

View File

@ -45,9 +45,16 @@ fi
echo "==> GPG" echo "==> GPG"
if [ -d ~/.gnupg ]; then if [ -d ~/.gnupg ]; then
chmod go-rwx ~/.gnupg ~/.gnupg/* chmod go-rwx ~/.gnupg ~/.gnupg/*
[ -e "$SOURCEDIR" ] || git clone git@gitlab.com:Ambrevar/personal if [ -e "$SOURCEDIR" ]; then
mkdir ~/.password-store git -C "$SOURCEDIR" pull
[ -e ~/.password-store ] || git clone git@gitlab.com:Ambrevar/password-store ~/.password-store else
git clone git@gitlab.com:Ambrevar/personal
fi
if [ -e ~/.password-store ]; then
git -C ~/.password-store pull
else
git clone git@gitlab.com:Ambrevar/password-store ~/.password-store
fi
else else
echo "~/.gnupg not found." echo "~/.gnupg not found."
fi fi
@ -59,7 +66,8 @@ done
echo "==> dotfiles" echo "==> dotfiles"
if [ -e ~/dotfiles ]; then if [ -e ~/dotfiles ]; then
git remote origin set-url git@github.com:Ambrevar/dotfiles git -C ~/dotfiles remote set-url origin git@github.com:Ambrevar/dotfiles
git -C ~/dotfiles pull
else else
git clone git@github.com:Ambrevar/dotfiles git clone git@github.com:Ambrevar/dotfiles
fi fi
@ -95,6 +103,8 @@ if command -v pacman >/dev/null 2>&1; then
if [ -n "$pacman_list" ]; then if [ -n "$pacman_list" ]; then
sudo pacman --noconfirm -Rs "$pacman_list" sudo pacman --noconfirm -Rs "$pacman_list"
fi fi
elif command -v guix >/dev/null 2>&1; then
guix package --manifest=~/.pkglists/guix
fi fi
echo "==> Bookmarks" echo "==> Bookmarks"
@ -147,9 +157,8 @@ if command -v emacs >/dev/null 2>&1; then
echo "==> Emacs extra packages" echo "==> Emacs extra packages"
mkdir -pv ~/.local/share/emacs/site-lisp mkdir -pv ~/.local/share/emacs/site-lisp
for i in ~/.local/share/emacs/site-lisp/*; do for i in ~/.local/share/emacs/site-lisp/*; do
pushd "$i" echo "$i"
git pull git -C "$i" pull
popd
done done
fi fi