Skip to content

Commit

Permalink
AIR installer app to create new projects. Done by Shi Chuan. Fixes #109
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 23, 2010
1 parent 7ea0bb0 commit ecd9664
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
Binary file added createproject.air
Binary file not shown.
69 changes: 69 additions & 0 deletions createproject.sh
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

0 comments on commit ecd9664

Please sign in to comment.