~hedy/dotfiles

08a9d672a8b40f85085645211ce5596246c2b1ec — hedy a month ago 36c250c
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
1 files changed, 21 insertions(+), 0 deletions(-)

A dotscripts/install/yadm
A dotscripts/install/yadm => dotscripts/install/yadm +21 -0
@@ 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