commit - 11fee02d37644c27985762113f264d4c6dcfd3c1
commit + fe9a854b5b4ecb690af6233aa118d0d5b40f6966
blob - db3a0e5d109543496f98399145465956c7630959
blob + 62a83e8007334f149f69084e8684163b2919ad04
--- .shrc
+++ .shrc
alias gc='git commit' gca='gc --amend' gt='git tag'
alias gp='git push' gu='git pull' gf='git fetch'
alias gr='git rebase' grc='git rebase --continue'
-alias dot='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
# gpg alias
# https://github.com/drduh/YubiKey-Guide?tab=readme-ov-file#using-keys
blob - /dev/null
blob + 07e59626eabf7bd3886b84db3f03c181060a8b7e (mode 644)
--- /dev/null
+++ install.sh
+#!/bin/sh
+set -eu
+
+dotdir="$(cd "$(dirname "$0")" && pwd)"
+
+files=$(find "$dotdir" -type f \
+ ! -name install.sh \
+ ! -name README.md \
+ ! -name CLAUDE.md \
+ ! -path '*/.got/*' \
+ ! -path '*/.claude/*' \
+ | sed "s|^$dotdir/||")
+
+uninstall=0
+case "${1:-}" in
+ -u | --uninstall) uninstall=1 ;;
+ "") ;;
+ *)
+ echo "usage: ${0##*/} [-u | --uninstall]" >&2
+ exit 1
+ ;;
+esac
+
+for f in $files; do
+ target="$HOME/$f"
+
+ if [ "$uninstall" -eq 1 ]; then
+ if [ -L "$target" ]; then
+ rm "$target"
+ echo "removed $target"
+ fi
+ else
+ mkdir -p "$(dirname "$target")"
+ ln -sf "$dotdir/$f" "$target"
+ echo "linked $target -> $dotdir/$f"
+ fi
+done