Scripts: Add yadm install/upgrade script
Before setting up dotfiles, you can just: curl https://hedy.tilde.cafe/scripts/install_yadm | bash ^that script is symlink'ed to this
This commit is contained in:
parent
36c250c93a
commit
08a9d672a8
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if command -v yadm &> /dev/null; then
|
||||||
|
if ! [ -f ~/local/src/yadm/yadm ]; then
|
||||||
|
echo "Attempted to upgrade yadm, but it was not installed (as a git clone) at ~/local/src/yadm/."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
cd ~/local/src/yadm
|
||||||
|
git pull
|
||||||
|
cd - > /dev/null
|
||||||
|
echo "Upgraded yadm!"
|
||||||
|
echo "> yadm --version"
|
||||||
|
yadm --version
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ~/local/bin
|
||||||
|
mkdir ~/local/src
|
||||||
|
|
||||||
|
git clone https://github.com/TheLocehiliosan/yadm.git ~/local/src/yadm
|
||||||
|
ln -s ~/local/src/yadm/yadm ~/local/bin/yadm
|
Loading…
Reference in New Issue