summary refs log tree commit diff
path: root/link.sh
blob: 6763f2e001eb6837f4317e92998b91a63c4a491a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -eu

die() {
	echo "$*"
	exit 1
}

if [ $# -eq 1 ]; then
	link=$1
	file="${PWD}/home/${link#${HOME}/}"
	[ ! -f "$file" ] || die "${file} exists"
	mkdir -p "${file%/*}"
	mv "$link" "$file"
fi

find home -type f | while read -r find; do
	file="${PWD}/${find}"
	link="${HOME}/${find#home/}"
	mkdir -p "${link%/*}"
	[ \( -f "$link" -a -L "$link" \) -o ! -f "$link" ] || die "${link} exists"
	ln -fs "$file" "$link"
done
'/src/commit/bin/1sh/histedit.c?id=5edd42165eadd7f285ed02f4de75c9a269366a26&follow=1'>Remove reference to FreeBSD-specific libedit hackJune McEnroe Newer versions of libedit have sane tab-complete now without FreeBSD's hacks, and in fact the hack is gone in FreeBSD-CURRENT. I'm still a little confused why binding this weird function is necessary at all, but at least it exists everywhere, I guess. 2020-06-08Prefix mandoc with exec in about-filterJune McEnroe 2020-06-07Remove mktemp options from mkbuiltins, mktokensJune McEnroe Why even? 2020-06-07Cast z_stream fields to size_tJune McEnroe In the version of zlib in OpenBSD, these fields are of type off_t, which is signed (why?), rather than uLong. 2020-06-07Call static_assert by _Static_assertJune McEnroe OpenBSD doesn't #define static_assert in assert.h and _Static_assert is its real name I guess so why not? 2020-06-07Add OpenBSD to install.shJune McEnroe Straightforward. 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe