summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2017-01-21 17:31:18 -0500
committerJune McEnroe <june@causal.agency>2017-01-21 17:31:18 -0500
commit16a7e952a964da4da80ca7e2f0043e6ea5004312 (patch)
tree900d2158b83e37d9cbcc1bbece1fc649507fb063
parentGroup git aliases (diff)
downloadsrc-16a7e952a964da4da80ca7e2f0043e6ea5004312.tar.gz
src-16a7e952a964da4da80ca7e2f0043e6ea5004312.zip
Use zsh for shell scripts
Diffstat (limited to '')
-rwxr-xr-ximport.sh6
-rwxr-xr-xinstall.sh50
-rwxr-xr-xprune.sh6
-rwxr-xr-xvendor.sh2
4 files changed, 32 insertions, 32 deletions
diff --git a/import.sh b/import.sh
index 66dde777..bd4909fb 100755
--- a/import.sh
+++ b/import.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env zsh
 
 # Import a file from ~ and replace it with a symlink.
 
@@ -9,7 +9,7 @@ error() {
   exit 1
 }
 
-[ -z "$1" ] && error "no path"
+[ -z "$1" ] && error 'no path'
 
 source_path="$HOME/$1"
 dest_path="$PWD/$1"
@@ -20,4 +20,4 @@ dest_path="$PWD/$1"
 mkdir -p "$(dirname "$dest_path")"
 mv "$source_path" "$dest_path"
 ln -s "$dest_path" "$source_path"
-echo "link $1" >> install.sh
+echo "link '$1'" >> install.sh
diff --git a/install.sh b/install.sh
index 7a939866..63790ef0 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env zsh
 
 # Create symlinks in ~ for files in the current directory.
 
@@ -16,33 +16,33 @@ link() {
   [ -h "$dest_path" ] && return
   [ -e "$dest_path" ] && error "$dest_path exists"
 
-  mkdir -p "$(dirname $dest_path)"
+  mkdir -p "$(dirname "$dest_path")"
   ln -s "$source_path" "$dest_path"
   echo "$1"
 }
 
-if [ -d ~/Library ]; then
-  link Library/Application\ Support/Karabiner/private.xml
-  link Library/Keyboard\ Layouts/Programmer.keylayout
+if [ -d '~/Library' ]; then
+  link 'Library/Application Support/Karabiner/private.xml'
+  link 'Library/Keyboard Layouts/Programmer.keylayout'
 fi
 
-link .bin/clock.c
-link .bin/jrp.c
-link .bin/manpager
-link .bin/pbcopy.c
-link .bin/pbd.c
-link .bin/xx.c
-link .config/git/config
-link .config/git/ignore
-link .config/htop/htoprc
-link .config/nvim/autoload/pathogen.vim
-link .config/nvim/colors/lame.vim
-link .config/nvim/init.vim
-link .config/nvim/syntax/nasm.vim
-link .gdbinit
-link .gnupg/gpg-agent.conf
-link .inputrc
-link .psqlrc
-link .ssh/config
-link .tmux.conf
-link .zshrc
+link '.bin/clock.c'
+link '.bin/jrp.c'
+link '.bin/manpager'
+link '.bin/pbcopy.c'
+link '.bin/pbd.c'
+link '.bin/xx.c'
+link '.config/git/config'
+link '.config/git/ignore'
+link '.config/htop/htoprc'
+link '.config/nvim/autoload/pathogen.vim'
+link '.config/nvim/colors/lame.vim'
+link '.config/nvim/init.vim'
+link '.config/nvim/syntax/nasm.vim'
+link '.gdbinit'
+link '.gnupg/gpg-agent.conf'
+link '.inputrc'
+link '.psqlrc'
+link '.ssh/config'
+link '.tmux.conf'
+link '.zshrc'
diff --git a/prune.sh b/prune.sh
index af2379e5..cc6e2444 100755
--- a/prune.sh
+++ b/prune.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env zsh
 
 # Remove symbolic links in ~ to files that no longer exist.
 
@@ -7,6 +7,6 @@ set -o errexit -o nounset -o pipefail
 paths=$(find -L ~ -type l -lname "$PWD/*")
 
 for path in $paths; do
-  rm $path
-  echo $path
+  rm "$path"
+  echo "$path"
 done
diff --git a/vendor.sh b/vendor.sh
index 710231a2..b5785d06 100755
--- a/vendor.sh
+++ b/vendor.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env zsh
 
 # Pull latest versions of vendored files.