Skip to content

Commit

Permalink
Add some missing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Aug 27, 2019
1 parent 0032937 commit d2e7d48
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
20 changes: 15 additions & 5 deletions bin/install
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/bin/bash
#
# Install script for config files
#
# This script was originally written for Linux and I haven't yet rewritten it to
# run properly on macOS
#
# These find scripts won't work on stock macOS find(1). `brew install findutils`
# to make it work.
#
# Same goes for readlink(1). `brew install coreutils` for this.

set -euo pipefail

Expand All @@ -14,16 +24,16 @@ get_script_dir () {

cd "$(get_script_dir)/.." || exit

for dir in $(cd etc && find . ! -path . -type d -printf '%P\n'); do
for dir in $(cd etc && gfind . ! -path . -type d -printf '%P\n'); do
mkdir -pv "$HOME/.$dir"
done
for path in $(cd etc && find . -type f -printf '%P\n'); do
ln -fsv "$(readlink -f "$(get_script_dir)/../etc/$path")" "$HOME/.$path"
for path in $(cd etc && gfind . -type f -printf '%P\n'); do
ln -fsv "$(greadlink -f "$(get_script_dir)/../etc/$path")" "$HOME/.$path"
done

mkdir -pv "$HOME/bin"
for bin in $(cd bin && find . -executable -type f -printf '%P\n'); do
for bin in $(cd bin && gfind . -executable -type f -printf '%P\n'); do
if [[ "$bin" != "install" ]]; then
ln -fsv "$(readlink -f "$(get_script_dir)/../bin/$bin")" "$HOME/bin/$bin"
ln -fsv "$(greadlink -f "$(get_script_dir)/../bin/$bin")" "$HOME/bin/$bin"
fi
done
2 changes: 1 addition & 1 deletion etc/config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fish config

set -gx EDITOR nvim
set -gx EDITOR "code --wait"

# Paths
set -gx GOPATH $HOME/.go
Expand Down
1 change: 1 addition & 0 deletions etc/gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[github]
user = smith
[alias]
d = commit . -m "duh" --no-verify
br = branch
ci = commit
co = checkout
Expand Down

0 comments on commit d2e7d48

Please sign in to comment.