-
Notifications
You must be signed in to change notification settings - Fork 3
/
install
executable file
·44 lines (35 loc) · 1.11 KB
/
install
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
#!/bin/sh
currentDir=$( echo ${PWD##*/} )
red='\033[0;31m'
blue='\033[0;34m'
green='\033[0;32m'
NC='\033[0m' # No Color
#echo -e "${red}Hello Stackoverflow${NC}"
if [ $currentDir != 'LeadPagesBuildSystem' ]; then
# New Template. Switch branch to yeoman to copy the skeleton folders and files
if [ ! -d "leadpages-template" ]; then
echo "${green}No leadpages-template folder found. Getting a skeleton copy.${NC}"
mkdir tmp && \
git checkout yeoman && \
cp -r ./leadpages-template ./tmp/leadpages-template && \
git co master && \
cp -r ./tmp/leadpages-template ./leadpages-template && \
rm -rf ./tmp
fi
echo "${blue}Installing Build System...${NC}"
npm install
rm -rf .git install readme && \
echo \n\n"node_modules" >> .gitignore && \
echo \n\n".DS_Store" >> .gitignore
if [ ! -d ".git" ]; then
git init && git add . && git status
fi
else
echo "${blue}Installing Build System...${NC}"
rm -rf .git readme.md install && \
cp -r * ../
cd ..
rm -rf LeadPagesBuildSystem
echo "${red}Please${NC} ${green}cd ..${NC} ${red}and run${NC} ${green}npm install${NC}"
fi
echo "${blue}Done! Happy coding!${NC}"