forked from twbs/bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AIR installer app to create new projects. Done by Shi Chuan. Fixes #109
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Generate a new project from your HTML5 Boilerplate repo clone | ||
#Created 2010-10-13, Rick Waldron | ||
|
||
|
||
##first run | ||
# $ cd html5-boilerplate | ||
# $ sudo chmod a+x makep.sh && ./makep.sh | ||
|
||
##usage | ||
# $ cd html5-boilerplate | ||
# $ ./makep.sh | ||
|
||
echo "To create a new html5-boilerplate project, enter a new directory name:" | ||
|
||
read name | ||
|
||
cd .. | ||
|
||
webroot=$PWD | ||
|
||
SRC=$webroot"/html5-boilerplate" | ||
DST=$webroot"/"$name | ||
|
||
if [ -d "$DST" ] | ||
then | ||
echo "$DST exists" | ||
else | ||
#create new project | ||
mkdir $name | ||
|
||
#sucess message | ||
echo "Created Directory: $DST" | ||
|
||
cd $SRC | ||
|
||
#copy to new project directory | ||
#http://en.wikipedia.org/wiki/Cpio#Copy | ||
#http://cybertiggyr.com/cpio-howto/ | ||
#http://www.cyberciti.biz/faq/how-do-i-use-cpio-command-under-linux/ | ||
find . -depth -print0 | cpio -0pdmv $DST | ||
|
||
|
||
#sucess message | ||
echo "Created Project: $DST" | ||
|
||
#move into new project | ||
cd $DST | ||
|
||
#in Bourne Again Shell, the cpio was copying | ||
#the whole dir into the new project, along with the contents | ||
if [ -d "$DST/html5-boilerplate" ] | ||
then | ||
sudo rm -r html5-boilerplate | ||
fi | ||
|
||
if [ -e "$DST/makep.sh" ] | ||
then | ||
sudo rm -r makep.sh | ||
fi | ||
|
||
if [ -e "$DST/.git" ] | ||
then | ||
sudo rm -r .git | ||
fi | ||
|
||
fi | ||
|