-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use make for installation, put linux-specific config in subdir
- Loading branch information
Showing
8 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.PHONY: update-submodules install install-linux | ||
|
||
update-submodules: | ||
git submodule update --init | ||
|
||
install: | ||
sh scripts/install-dotfiles.sh | ||
|
||
install-linux: | ||
sh scripts/install-dotfiles.sh | ||
sh scripts/install-dotfiles-linux.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Install linux-specific dotfiles (i.e., anything that doesn't apply | ||
# to macOS) to the user's HOME by symbolically linking them. | ||
|
||
set -e | ||
|
||
function run() { | ||
echo "$@" | ||
$($@) | ||
} | ||
|
||
function lns() { | ||
run "ln -s $1 $2" | ||
} | ||
|
||
dotfiles=( linux/xmonad | ||
linux/xmobarrc | ||
linux/gtkrc-2.0 | ||
linux/Xresources | ||
) | ||
regex="/?([^/]+)$" | ||
for i in "${dotfiles[@]}" ; do | ||
[[ $i =~ $regex ]] | ||
filename=${BASH_REMATCH[1]} | ||
dotfilename="$HOME/.$filename" | ||
if [[ ! -e $dotfilename ]]; then | ||
cmd="ln -s $(pwd)/$i $dotfilename" | ||
run $cmd | ||
fi | ||
done | ||
|
||
mkdir -p $HOME/bin | ||
for i in bin/* ; do | ||
if [[ ! -e $HOME/$i ]]; then | ||
cmd="ln -s $(pwd)/$i $HOME/$i" | ||
run $cmd | ||
fi | ||
done | ||
|
||
if [[ ! -e $HOME/.dotfiles ]]; then | ||
lns $(pwd) $HOME/.dotfiles | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters