summary refs log tree commit diff
path: root/link.zsh
blob: e9fa64ca885e379f1b8a2e8c1eb82dab4ea0f8fc (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
Remove unused mbs.len field from struct EditJune McEnroe 2022-02-19Remove unneeded includes in ui.cJune McEnroe 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe 2022-02-18Implement new line editing "library"June McEnroe 2022-02-18Simplify cursor positioning in inputJune McEnroe 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe