diff options
author | June McEnroe <june@causal.agency> | 2018-05-13 00:37:16 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-05-13 00:42:27 -0400 |
commit | 758b40ccc4193535bd07801d554bf5416969804d (patch) | |
tree | 2a196a6fc7a9ad7dc0c0360ee90b6ceb454dcad7 | |
parent | I've really done it now (diff) | |
download | src-758b40ccc4193535bd07801d554bf5416969804d.tar.gz src-758b40ccc4193535bd07801d554bf5416969804d.zip |
Tabify shell scripts
Diffstat (limited to '')
-rwxr-xr-x | etc/tf/link.zsh | 2 | ||||
-rwxr-xr-x | install.sh | 6 | ||||
-rwxr-xr-x | link.zsh | 20 | ||||
-rwxr-xr-x | pdf.zsh | 10 | ||||
-rwxr-xr-x | prune.zsh | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/etc/tf/link.zsh b/etc/tf/link.zsh index a00f1c01..7753517e 100755 --- a/etc/tf/link.zsh +++ b/etc/tf/link.zsh @@ -3,5 +3,5 @@ set -o errexit -o nounset tf="$HOME/Library/Application Support/Steam/steamapps/common/Team Fortress 2/tf" for cfg in cfg/*.cfg; do - ln -s -f "$PWD/$cfg" "$tf/$cfg" + ln -s -f "$PWD/$cfg" "$tf/$cfg" done diff --git a/install.sh b/install.sh index fb7a0d93..1eb0dc8a 100755 --- a/install.sh +++ b/install.sh @@ -8,9 +8,9 @@ pacman="$any base-devel ctags gdb openssh zsh" homebrew='https://raw.githubusercontent.com/Homebrew/install/master/install' if [ "$(uname)" = 'Darwin' ]; then - xcode-select --install || true - [ -f /usr/local/bin/brew ] || ruby -e "$(curl -fsSL "$homebrew")" - exec brew install $brew + xcode-select --install || true + [ -f /usr/local/bin/brew ] || ruby -e "$(curl -fsSL "$homebrew")" + exec brew install $brew fi [ -f /usr/local/sbin/pkg ] && exec pkg install $pkg diff --git a/link.zsh b/link.zsh index e9fa64ca..a0a9e7aa 100755 --- a/link.zsh +++ b/link.zsh @@ -2,17 +2,17 @@ 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" + 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" + filePath="$PWD/$findPath" + linkPath="$HOME/${findPath#home/}" + mkdir -p "$(dirname "$linkPath")" + [[ ( -f "$linkPath" && -L "$linkPath" ) || ! -f "$linkPath" ]] + ln -s -f "$filePath" "$linkPath" done diff --git a/pdf.zsh b/pdf.zsh index d9aab752..25458dfa 100755 --- a/pdf.zsh +++ b/pdf.zsh @@ -4,16 +4,16 @@ set -o errexit -o nounset -o pipefail mkdir -p pdf fetch() { - [[ -f "pdf/$1" ]] && return - curl --silent --show-error --output "pdf/$1" "$2" - echo "pdf/$1" + [[ -f "pdf/$1" ]] && return + curl --silent --show-error --output "pdf/$1" "$2" + echo "pdf/$1" } elf() { - fetch "$1" "http://refspecs.linuxbase.org/elf/$2" + fetch "$1" "http://refspecs.linuxbase.org/elf/$2" } intel() { - fetch "$1" "https://software.intel.com/sites/default/files/managed/$2" + fetch "$1" "https://software.intel.com/sites/default/files/managed/$2" } elf abi.pdf x86_64-abi-0.99.pdf diff --git a/prune.zsh b/prune.zsh index 928fe066..db85a9d1 100755 --- a/prune.zsh +++ b/prune.zsh @@ -2,6 +2,6 @@ set -o errexit -o nounset -o pipefail find -L ~ -type l -lname "$PWD/*" | while read -r linkPath; do - rm "$linkPath" - echo "$linkPath" + rm "$linkPath" + echo "$linkPath" done |