-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·48 lines (36 loc) · 1.24 KB
/
install.sh
File metadata and controls
executable file
·48 lines (36 loc) · 1.24 KB
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
SCRIPT_PATH="$(dirname "$(realpath $0)")"
export DEVENV_INSTALL="$SCRIPT_PATH"
# Make sure things are updated
echo "######################################"
echo "------------- dnf update -------------"
echo "######################################"
dnf check-update -q && sudo dnf update -y -q
# Create ~/.profile.d directory if non-existant
if [ ! -d ~/.profile.d ]; then
mkdir -p ~/.profile.d
fi
# Link dev-env's .profile file (which makes sure to iterate through ~/.profile.d)
if [ -e ~/.profile ] && [ ! -h ~/.profile ]; then
mv ~/.profile ~/.profile.bak
fi
ln -fns "$SCRIPT_PATH/.profile" ~/.profile
# If user already has an ~/.aliases file, this makes sure it will get picked up by ~/.profile
if [ -e ~/.aliases ] && [ ! -e ~/.aliases.private ]; then
mv ~/.aliases ~/.aliases.private
fi
## DO INSTALLS
# If no plugins were passed, default to installing a basic set in order
if [ $# -eq 0 ]; then
set -- git ssh base-toolset lang shell-aliases
fi
# Run all of the indicated plugins
for i; do
echo ""
# Make this look nicer...
echo "#####################################"
echo "---------- Installing ${i} ----------"
echo "#####################################"
source "$(dirname "$0")/${i}/install.sh"
done
source ~/.profile