Skip to content

Commit cc7f444

Browse files
committed
Use $DOTFILES var throughout.
1 parent b771883 commit cc7f444

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

bin/dotfiles

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fi
272272

273273
# Initialize.
274274
if [[ ! -d $DOTFILES ]]; then
275-
# ~/.dotfiles doesn't exist? Clone it!
275+
# $DOTFILES directory doesn't exist? Clone it!
276276
new_dotfiles_install=1
277277
prompt_delay=15
278278
e_header "Downloading dotfiles"

source/00_dotfiles.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Passing the "source" arg tells it to only define functions, then quit.
2-
source ~/.dotfiles/bin/dotfiles "source"
2+
source $DOTFILES/bin/dotfiles "source"

source/50_editor.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export VISUAL="$EDITOR"
1414
alias q.='q .'
1515

1616
function qs() {
17-
pwd | perl -ne"s#^$(echo ~/.dotfiles)## && exit 1" && cd ~/.dotfiles
18-
q ~/.dotfiles
17+
pwd | perl -ne"s#^$(echo $DOTFILES)## && exit 1" && cd $DOTFILES
18+
q $DOTFILES
1919
}

source/50_file.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function md() {
4141
}
4242

4343
# Fast directory switching
44-
mkdir -p ~/.dotfiles/caches/z
44+
mkdir -p $DOTFILES/caches/z
4545
_Z_NO_PROMPT_COMMAND=1
46-
_Z_DATA=~/.dotfiles/caches/z/z
47-
. ~/.dotfiles/vendor/z/z.sh
46+
_Z_DATA=$DOTFILES/caches/z/z
47+
. $DOTFILES/vendor/z/z.sh

source/50_osx.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ function vm_template() {
4848
# Export Localization.prefPane text substitution rules.
4949
function txt_sub_backup() {
5050
local prefs=~/Library/Preferences/.GlobalPreferences.plist
51-
local backup=~/.dotfiles/conf/osx/NSUserReplacementItems.plist
51+
local backup=$DOTFILES/conf/osx/NSUserReplacementItems.plist
5252
/usr/libexec/PlistBuddy -x -c "Print NSUserReplacementItems" "$prefs" > "$backup" &&
5353
echo "File ~${backup#$HOME} written."
5454
}
5555

5656
# Import Localization.prefPane text substitution rules.
5757
function txt_sub_restore() {
5858
local prefs=~/Library/Preferences/.GlobalPreferences.plist
59-
local backup=~/.dotfiles/conf/osx/NSUserReplacementItems.plist
59+
local backup=$DOTFILES/conf/osx/NSUserReplacementItems.plist
6060
if [[ ! -e "$backup" ]]; then
6161
echo "Error: file ~${backup#$HOME} does not exist!"
6262
return 1

source/50_ruby.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export PATH
22

33
# rbenv init.
4-
PATH="$(path_remove ~/.dotfiles/vendor/rbenv/bin):~/.dotfiles/vendor/rbenv/bin"
4+
PATH="$(path_remove $DOTFILES/vendor/rbenv/bin):$DOTFILES/vendor/rbenv/bin"
55

66
if [[ "$(type -P rbenv)" && ! "$(type -t _rbenv)" ]]; then
77
eval "$(rbenv init -)"

test/test_path_remove.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
source ~/.dotfiles/source/00_dotfiles.sh
2+
source $DOTFILES/source/00_dotfiles.sh
33

44
e_header "$(basename "$0" .sh)"
55

test/test_to_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
source ~/.dotfiles/source/00_dotfiles.sh
2+
source $DOTFILES/source/00_dotfiles.sh
33

44
e_header "$(basename "$0" .sh)"
55

0 commit comments

Comments
 (0)