-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·43 lines (32 loc) · 897 Bytes
/
install.sh
File metadata and controls
executable file
·43 lines (32 loc) · 897 Bytes
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
#!/usr/bin/env bash
set -xe
cd "$(dirname "$0")" || exit
DOTFILESPATH=$(pwd -P)
export DOTFILESPATH
profilePath=~/.profile
# create .profile if it doesn't exist
if [[ ! -e "$profilePath" ]]; then
echo '#!/usr/bin/env sh' > "$profilePath"
fi
# add DOTFILESPATH to .profile
dotFilesPathCommand="export DOTFILESPATH=$DOTFILESPATH"
if ! grep "$dotFilesPathCommand" < "$profilePath"
then
echo "$dotFilesPathCommand" >> "$profilePath"
fi
if [[ "$(uname -s)" == "Linux" ]]
then
sudo apt-get update
if ! command -v curl &> /dev/null
then
sudo apt install curl -y
fi
fi
# shellcheck source=./fonts/install.sh
source "$DOTFILESPATH/fonts/install.sh"
# shellcheck source=./zsh/install.sh
source "$DOTFILESPATH/zsh/install.sh"
# shellcheck source=./pwsh/install.sh
source "$DOTFILESPATH/pwsh/install.sh"
# shellcheck source=./logfmtpp/install.sh
"$DOTFILESPATH/logfmtpp/install.sh"