-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
48 lines (33 loc) · 948 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -e
if (( "${#DOTFILES_FETCH[*]}" < 1 ))
then
DOTFILES_FETCH=(cat)
fi
if (( "${#DOTFILES_LOCATION[*]}" < 1 ))
then
DOTFILES_LOCATION=`dirname "${BASH_SOURCE[0]}"`
fi
if [[ ! -z "${DOTFILES_REMOTE}" ]]
then
DOTFILES_FETCH=(curl -sL)
DOTFILES_LOCATION="https://raw.githubusercontent.com/burgerdev/dotfiles/master"
fi
function install {
"${DOTFILES_FETCH[@]}" "${DOTFILES_LOCATION}/$1" > "$2"
}
echo "*** installing top-level rc files"
for rc in `"${DOTFILES_FETCH[@]}" "${DOTFILES_LOCATION}/.autogenerated/toplevelrcfiles"`
do
install "${rc}" "${HOME}/.${rc}"
done
echo '*** installing ${HOME}/.config'
configdir="config"
echo ' --- installing ${HOME}/.config/fish'
fishdir="${configdir}/fish"
fishtargetdir="${HOME}/.${fishdir}"
mkdir -p "${fishtargetdir}/functions"
for f in `"${DOTFILES_FETCH[@]}" "${DOTFILES_LOCATION}/.autogenerated/fish.functions"`
do
install "$f" "${HOME}/.$f"
done