From 474407ff089c50dd69ca3cbbde1896fbb9c6eb2e Mon Sep 17 00:00:00 2001
From: Bruce Flynn <brucef@ssec.wisc.edu>
Date: Thu, 15 Oct 2015 00:26:14 +0000
Subject: [PATCH] small change to build.sh

---
 build.sh | 10 ++++++----
 setup.py |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/build.sh b/build.sh
index 56fe7db..cbdc108 100755
--- a/build.sh
+++ b/build.sh
@@ -1,13 +1,13 @@
 #!/usr/bin/env bash
 
-function sdist() {
-version=$(grep version setup.py | sed 's/.*version=["\x27]//g;s/[\x27"].*//g')
+function write_version_file() {
+# pull version out of setup.py
+version=$(grep version setup.py | sed "s,.*'\(.*\)'.*$,\1,g")
 cat <<EOF > edosl0util/version.txt
 __version__ = '${version}'
 __githash__ = '$(git log --format="%H" | head -n 1)'
 __patch__ = """$(git diff)"""
 EOF
-python setup.py $@ 
 }
 
 if [ -z $1 ]
@@ -17,8 +17,10 @@ fi
 
 case $1 in
     sdist)
-        sdist $@
+        write_version_file
+        python setup.py sdist $@
         ;;
     *)
+        python setup.py $@
         ;;
 esac
diff --git a/setup.py b/setup.py
index 35a5aa2..85899f5 100644
--- a/setup.py
+++ b/setup.py
@@ -2,8 +2,10 @@ from setuptools import setup, find_packages
 
 setup(
     name='EdosL0Util',
+    author='Bruce Flynn',
+    author_email='brucef@ssec.wisc.edu',
     description='Utilities for working with EDOS L0 PDS files',
-    version='0.4.dev8',
+    version='0.4.dev9',
     zip_safe=False,
     packages=find_packages(),
     install_requires=[
-- 
GitLab