forked from xjdesigns/LeadPagesBuildSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·42 lines (32 loc) · 1 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
#!/bin/sh
currentDir=$( echo ${PWD##*/} )
red='\033[0;31m'
blue='\033[0;34m'
green='\033[0;32m'
reset='\033[0m'
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.${reset}"
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...${reset}"
npm install
rm -rf .git install readme
if [ ! -d ".git" ]; then
git init && git add . && git status
fi
else
echo "${blue}Installing Build System...${reset}"
rm -rf .git readme.md install && \
cp -r * ../
cd ..
rm -rf LeadPagesBuildSystem
echo "${red}Please${reset} ${green}cd ..${reset} ${red}and run${reset} ${green}npm install${reset}"
fi
echo "${blue}Done! Happy coding!${reset}"