... | ... |
@@ -34,6 +34,7 @@ rack_root_detect(){ |
34 | 34 |
[[ ${basedir} == "/" ]] && return 1 |
35 | 35 |
echo `basename $basedir | sed -E "s/.(com|net|org)//"` |
36 | 36 |
} |
37 |
+ |
|
37 | 38 |
kapow(){ |
38 | 39 |
local vhost=$1 |
39 | 40 |
[ ! -n "$vhost" ] && vhost=$(rack_root_detect) |
... | ... |
@@ -43,11 +44,23 @@ kapow(){ |
43 | 43 |
return 1 |
44 | 44 |
fi |
45 | 45 |
|
46 |
- # [ ! -d "~/.pow/${vhost}/tmp" ] && mkdir -p "~/.pow/$vhost/tmp" |
|
46 |
+ [ ! -d ~/.pow/${vhost}/tmp ] && mkdir -p ~/.pow/$vhost/tmp |
|
47 | 47 |
touch ~/.pow/$vhost/tmp/restart.txt; |
48 | 48 |
[ $? -eq 0 ] && echo "pow: restarting $vhost.dev" |
49 | 49 |
} |
50 | 50 |
compctl -W ~/.pow -/ kapow |
51 | 51 |
|
52 |
+powit(){ |
|
53 |
+ local basedir=$(pwd) |
|
54 |
+ local vhost=$1 |
|
55 |
+ [ ! -n "$vhost" ] && vhost=$(rack_root_detect) |
|
56 |
+ if [ ! -h ~/.pow/$vhost ] |
|
57 |
+ then |
|
58 |
+ echo "pow: Symlinking your app with pow. ${vhost}" |
|
59 |
+ [ ! -d ~/.pow/${vhost} ] && ln -s $basedir ~/.pow/$vhost |
|
60 |
+ return 1 |
|
61 |
+ fi |
|
62 |
+} |
|
63 |
+ |
|
52 | 64 |
# View the standard out (puts) from any pow app |
53 |
-alias kaput="tail -f ~/Library/Logs/Pow/apps/*" |
|
54 | 65 |
\ No newline at end of file |
66 |
+alias kaput="tail -f ~/Library/Logs/Pow/apps/*" |