-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·37 lines (31 loc) · 854 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·37 lines (31 loc) · 854 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
#! /bin/bash
#
# Created By Sumeru Chatterjee 10/06/11
#
# Basically this will call bootstrap.sh in all the subdirectories.
echo "Bootstrapping ${PWD##*/}..."
export OLDPATH=$PATH
execute() {
cat ${1} | grep -i "export path=" > exports.bash
if [ -s exports.bash ]; then source exports.bash; rm exports.bash;fi;
bash ${1}
}
#bootstrap all other folders if they have a bootstrapper
for dir in ./*/
do
if [[ -f $dir/bootstrap.sh ]]
then
if [[ ! $dir == "./dotfiles/" ]]; then echo ""; cd $dir ; execute bootstrap.sh ;cd .. ;fi;
fi
done
#now bootstrap the dot files
if [[ -f ./dotfiles/bootstrap.sh ]]
then
echo ""
cd ./dotfiles
cat bootstrap.sh | grep -i "export path=" > exports.bash
if [ -s exports.bash ]; then source exports.bash; rm exports.bash;fi;
echo ${PATH%$OLDPATH} > .dynamicpaths
bash bootstrap.sh
cd ..
fi