changeset 855:8e41e95aac97

indentation
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 12:48:43 -0800
parents 66321798ac82
children 1c3f6daa1190
files .bashrc
diffstat 1 files changed, 24 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/.bashrc	Mon Dec 11 16:56:22 2017 +0000
+++ b/.bashrc	Sun Dec 17 12:48:43 2017 -0800
@@ -383,39 +383,40 @@
 }
 
 distribute() {
-# upload to pypi
+    # upload to pypi
     python setup.py egg_info sdist register upload develop
 }
 
 render_long_description() {
-# check the long_description from the command line:
-# https://docs.python.org/3.1/distutils/uploading.html#pypi-package-display
+    # check the long_description from the command line:
+    # https://docs.python.org/3.1/distutils/uploading.html#pypi-package-display
     python setup.py --long-description | rst2html.py > output.html
 }
 
 nearest-venv() {
-# find the nearest venv
-if [[ "$#" == "0" ]]
-then
-directory=$PWD
-else
-directory=$1
-fi
-directory=$(python -c "import os; print (os.path.abspath('${directory}'))")
+    # find the nearest venv
+
+    if [[ "$#" == "0" ]]
+    then
+        directory=$PWD
+    else
+        directory=$1
+    fi
+
+    directory=$(python -c "import os; print (os.path.abspath('${directory}'))")
 
-while [[ "${directory}" != "/" ]]
-do
-activate="${directory}/bin/activate"
-if [ -e "${activate}" ]
-then
-echo ${directory}
-return 0
-fi
+    while [[ "${directory}" != "/" ]]
+    do
+        activate="${directory}/bin/activate"
+        if [ -e "${activate}" ]
+        then
+            echo ${directory}
+            return 0
+        fi
 
-directory=$(dirname ${directory})
-
-done
-return 1
+        directory=$(dirname ${directory})
+    done
+    return 1
 }
 
 activate-nearest() {