commit 53c025b
hovercats
·
2025-09-23 13:32:01 +0000 UTC
parent ea79a87
home: rewrite in rc
A
rc/home
+16,
-0
1@@ -0,0 +1,16 @@
2+#!/bin/rc
3+
4+flag e +
5+
6+upstream=$HOME/src/selfmade/dotfiles
7+
8+if (test -e $upstream/HEAD) {
9+ GIT_WORK_TREE=$HOME
10+ GIT_DIR=$upstream
11+ git $*
12+}
13+if not {
14+ mkdir -p $upstream
15+ git clone --bare git@github.com:hovercats/dotfiles $upstream
16+}
17+
D
sh/home
+0,
-12
1@@ -1,12 +0,0 @@
2-#!/bin/sh
3-
4-set -eu
5-
6-upstream="$HOME/src/selfmade/dotfiles"
7-
8-[ -e "${upstream}/HEAD" ] || {
9- mkdir -p "${upstream}"
10- git clone --bare git@github.com:hovercats/dotfiles "${upstream}"
11-}
12-
13-git --git-dir="${upstream}" --work-tree="$HOME" "$@"