<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,11 +3,12 @@
 export MY_DEV_PATH=~/development
 export MY_EDITOR=mate
 
-bashrc () {
-    ed ~/.bashrc;
+edbp () {
+    ed $MY_DEV_PATH/bash-profile;
 }
 
 reload () { 
+    # Forces a reload of both the .bashrc and .profile files in the current bash session
 	source ~/.bashrc; 
 	source ~/.profile; 
 	echo '.bashrc and .profile reloaded!';
@@ -77,7 +78,8 @@ lsda () { ls $* $DEV_DJANGO_APPS; }
 
 edda () {
     if [ &quot;$#&quot; -lt 1  ]; then
-        echo &quot;Usage: djea \&quot;django app name\&quot;&quot;
+        echo &quot;Usage: edda django-app app&quot;;
+        echo &quot;This launches each django app supplied as arguments in your favorite editor.&quot;
         return;
     fi
     
@@ -85,11 +87,14 @@ edda () {
         if [ -d $DEV_DJANGO_APPS/$DJANGO_APP_PREFIX$a ]; then
             ed $DEV_DJANGO_APPS/$DJANGO_APP_PREFIX$a;
         elif [ -d $DEV_DJANGO_APPS/$a ]; then
+            # old not migrated apps
+            # TODO remove once all apps have been ported
             ed $DEV_DJANGO_APPS/$a;
         else
             echo &quot;neither '&quot;$DJANGO_APP_PREFIX$a &quot;' or '&quot; $a &quot;' exist in &quot; $DEV_DJANGO_APPS;
         fi
-    done    
+    done   
+     
 }
 mkda () {
     if [ &quot;$#&quot; -lt 1  ]; then
@@ -100,17 +105,23 @@ mkda () {
     # define path
     new_app_path=$DEV_DJANGO_APPS/$DJANGO_APP_PREFIX$1;    
     
+    if [ -d $new_app_path ]; then
+      echo $DJANGO_APP_PREFIX$1 &quot; already exists&quot;;
+    fi
+    
+    # TODO add python import test against existing apps on pythonpath
+
     # make default folders
     mkdir -p $new_app_path&quot;/examples&quot; $new_app_path&quot;/docs&quot; $new_app_path&quot;/tests&quot;;
     
-    cd $new_app_path
+    pushd $new_app_path;
     
     # create default files
-    touch AUTHORS &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; AUTHORS 
-    touch README &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; README 
-    touch INSTALL &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; INSTALL 
-    touch setup.py &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; setup.py 
-    touch LICENSE &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; LICENSE 
+    touch AUTHORS &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; AUTHORS;
+    touch README &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; README;
+    touch INSTALL &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; INSTALL; 
+    touch setup.py &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; setup.py; 
+    touch LICENSE &amp;&amp; echo &quot;django-&quot;$1&quot; == TODO&quot; &gt; LICENSE;
     
     # create app
     django-admin.py startapp $1;
@@ -120,6 +131,8 @@ mkda () {
     
     # add app to python path requires pylink/plink
     pylink $1 $1;
+    
+    popd;
 }
 
 rmda () {
@@ -130,12 +143,25 @@ rmda () {
        echo &quot; and the symlink from site-packages.&quot;;
        return;
     fi
+    # check to see if app exists with or without django-prefix
+    if [ -d $DEV_DJANGO_APPS/$DJANGO_APP_PREFIX$1 ]; then
+        apppath=$DEV_DJANGO_APPS/$DJANGO_APP_PREFIX$1;
+    elif [ -d $DEV_DJANGO_APPS/$a ]; then
+        # old not migrated apps
+        # TODO remove once all apps have been ported
+        apppath=$DEV_DJANGO_APPS/$1;
+    else
+        echo &quot;neither '&quot;$DJANGO_APP_PREFIX$1 &quot;' or '&quot; $1 &quot;' exist in &quot; $DEV_DJANGO_APPS;
+        return;
+    fi
+    
+    # ask for confirmation
     echo &quot;Are you sure you wish to delete django app: &quot;;
-    apppath=&quot;$DEV_DJANGO_APPS/$DJANGO_APP_PREFIX$1&quot;;
     echo &quot;&gt;&gt; $apppath&quot;;
     echo -n &quot;Yes/No? &quot;;
     read answer;
     answer=&quot;`echo $answer|tr '[:upper:]' '[:lower:]'`&quot;;
+    
     if [ &quot;$answer&quot; = &quot;yes&quot; ] || [ &quot;$answer&quot; = &quot;y&quot; ]; then
         
         # unlink from python path
@@ -144,16 +170,18 @@ rmda () {
         # recursively delete app from django apps folder
         rm -rfv $apppath;
 
-        echo &quot;Django App '$DJANGO_APP_PREFIX$1' successfully removed&quot;
+        echo &quot;Django App '$apppath' successfully removed&quot;
 
         return;
+        
     elif [ &quot;$answer&quot; = &quot;no&quot; ] || [ &quot;$answer&quot; = &quot;n&quot; ]; then
-        echo &quot;Remove django App $DJANGO_APP_PREFIX$1 stopped&quot;;
+        echo &quot;Remove django App $apppath stopped&quot;;
         return;
     else
-    echo &quot;Nothing happend Incorrect answer&quot;;
+        echo &quot;Nothing happend Incorrect answer&quot;;
     fi
 }
+
 ds () { cd $DEV_DJANGO_SITES/$*; }
 lsds () { ls $* $DEV_DJANGO_SITES; }
 edds () { 
@@ -177,4 +205,3 @@ mkds () {
     django-admin.py startproject $1;
     popd;
 }
-</diff>
      <filename>_bashrc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e80f93260daf089966edcbbed7047863ca681fcd</id>
    </parent>
  </parents>
  <author>
    <name>pearced</name>
    <email>limeyd@gmail.com</email>
  </author>
  <url>http://github.com/limeyd/bash-profile/commit/44c81002679e13ffa06ad45fb2e5cb2f9bf03d55</url>
  <id>44c81002679e13ffa06ad45fb2e5cb2f9bf03d55</id>
  <committed-date>2009-02-13T16:02:57-08:00</committed-date>
  <authored-date>2009-02-13T16:02:57-08:00</authored-date>
  <message>uppdated docs and fixed django-prefix bugs</message>
  <tree>0e6dfeb76affcaa44dc0b28cdace01d205d9d1b1</tree>
  <committer>
    <name>pearced</name>
    <email>limeyd@gmail.com</email>
  </committer>
</commit>
