summary refs log tree commit diff
path: root/link.zsh
blob: a0a9e7aa0f0576aabaafd2b0b9d45f7dc0a9d007 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env zsh
set -o errexit -o nounset -o pipefail

if [[ $# -eq 1 ]]; then
	linkPath="$1"
	filePath="$PWD/home/${linkPath#$HOME/}"
	[[ ! -f "$filePath" ]]
	mkdir -p "$(dirname "$filePath")"
	mv "$linkPath" "$filePath"
fi

find home -type f | while read -r findPath; do
	filePath="$PWD/$findPath"
	linkPath="$HOME/${findPath#home/}"
	mkdir -p "$(dirname "$linkPath")"
	[[ ( -f "$linkPath" && -L "$linkPath" ) || ! -f "$linkPath" ]]
	ln -s -f "$filePath" "$linkPath"
done
?h=1.9&id=c2317921f8429d0f2f0e7579beabf4dd9e987247&follow=1'>Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe