diff options
author | June McEnroe <june@causal.agency> | 2018-03-14 21:53:11 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-03-14 21:53:50 -0400 |
commit | e5101601fa06513a286645b7bfec2f885c9d54ed (patch) | |
tree | 23d2b4adcf8f050e518a7c4ceef38374cbdea4f3 /home | |
parent | Clean up install.sh (diff) | |
download | src-e5101601fa06513a286645b7bfec2f885c9d54ed.tar.gz src-e5101601fa06513a286645b7bfec2f885c9d54ed.zip |
Clean up home scripts, split again
Diffstat (limited to '')
-rw-r--r-- | home.txt | 17 | ||||
-rwxr-xr-x | home.zsh | 42 |
2 files changed, 0 insertions, 59 deletions
diff --git a/home.txt b/home.txt deleted file mode 100644 index 4489872e..00000000 --- a/home.txt +++ /dev/null @@ -1,17 +0,0 @@ -.bin/sup -.bin/tup -.bin/up -.config/git/config -.config/git/ignore -.config/htop/htoprc -.config/nvim/colors/trivial.vim -.config/nvim/init.vim -.config/nvim/syntax/nasm.vim -.gdbinit -.gnupg/gpg-agent.conf -.hushlogin -.inputrc -.lldbinit -.psqlrc -.ssh/config -.zshrc diff --git a/home.zsh b/home.zsh deleted file mode 100755 index 8490a3b5..00000000 --- a/home.zsh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env zsh -set -o errexit -o nounset -o pipefail - -fail() { - echo "$@" - exit 1 -} - -link() { - local relPath srcPath dstPath - < home.txt while read relPath; do - srcPath="$PWD/home/$relPath" - dstPath="$HOME/$relPath" - [ -L "$dstPath" ] && continue - mkdir -p "$(dirname "$dstPath")" - ln -s "$srcPath" "$dstPath" - echo "$relPath" - done -} - -import() { - local relPath srcPath dstPath - relPath="$1" - srcPath="$HOME/$relPath" - dstPath="$PWD/home/$relPath" - [ -f "$dstPath" ] && fail "$dstPath exists" - mkdir -p "$(dirname "$dstPath")" - mv "$srcPath" "$dstPath" - ln -s "$dstPath" "$srcPath" - echo "$relPath" >> home.txt - sort -o home.txt home.txt -} - -prune() { - local linkPath - find -L ~ -type l -lname "$PWD/*" | while read linkPath; do - rm "$linkPath" - echo "$linkPath" - done -} - -$@ |