-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathproj
More file actions
executable file
·29 lines (25 loc) · 705 Bytes
/
proj
File metadata and controls
executable file
·29 lines (25 loc) · 705 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
#!/bin/bash
# Author: Joseph Pecoraro
# Date: Wednesday February 25, 2009
# Description: Super-Quick stub for a new project!
# Expects an string for a folder name
if [ ! -n "$1" ]; then
echo "usage: `basename $0` name"
exit 1
fi
# Vars
name=$1
htdocs='/Applications/MAMP/htdocs/'
templatename='TEMPLATE'
# 1. The Dir Doesnt Exist, Create it from the Template
if [ ! -e "$htdocs$name" ]; then
echo "Creating $htdocs$name ..."
cp -R "$htdocs$templatename" "$htdocs$name"
rm -rf "$htdocs$name/.git"
rm "$htdocs$name/README.markdown"
rm "$htdocs$name/proj"
fi
# 2. Open in Finder and TextMate
echo "Opening $htdocs$name ..."
/usr/bin/env open "$htdocs$name"
/usr/bin/env mate "$htdocs$name"