|
@@ -217,7 +217,7 @@ This handles git as needed, by first checking to see if the first argument is ~i
|
|
|
git "$@"
|
|
|
cd ${OLD}
|
|
|
else
|
|
|
- if [[ $GIT == "detect" ]] ; then
|
|
|
+ if [[ $LIBRARY_GIT == "detect" ]] ; then
|
|
|
OLD=`pwd`
|
|
|
cd "${LIBRARY_DIRECTORY}"
|
|
|
git "$@"
|
|
@@ -311,13 +311,13 @@ This handles git as needed, by first checking to see if the first argument is ~i
|
|
|
echo "library bulk-add number"
|
|
|
exit 1
|
|
|
fi
|
|
|
- GITOLD="${GIT}"
|
|
|
- GIT=FALSE
|
|
|
+ GITOLD="${LIBRARY_GIT}"
|
|
|
+ LIBRARY_GIT=FALSE
|
|
|
for i in {1..$1} ; do
|
|
|
echo "Adding book number ${i}"
|
|
|
add_single
|
|
|
done
|
|
|
- GIT="${GITOLD}"
|
|
|
+ LIBRARY_GIT="${GITOLD}"
|
|
|
do_git add `basename "${LIBRARY_FILE}"`
|
|
|
do_git commit -m "Added ${1} records"
|
|
|
}
|
|
@@ -475,6 +475,20 @@ This handles git as needed, by first checking to see if the first argument is ~i
|
|
|
}
|
|
|
#+END_SRC
|
|
|
|
|
|
+* TODO Configuration
|
|
|
+:PROPERTIES:
|
|
|
+:ID: 86ea3306-d341-4580-9fd6-be04e3f723b2
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Configuration
|
|
|
+#+Name: configuration
|
|
|
+#+BEGIN_SRC sh
|
|
|
+ export LIBRARY_FILE=${LIBRARY_FILE:-~/.library/library.rec}
|
|
|
+ export LIBRARY_DIRECTORY=${LIBRARY_DIRECTOR:-~/.library}
|
|
|
+ export LIBRARY_GIT=${LIBRARY_GIT:-detect}
|
|
|
+ export LIBRARY_DEFAULT_FIELDS=${LIBRARY_DEFAULT_FIELDS:-ID,Title,Author,LCCN,Location,Course}
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
* DONE Help Message
|
|
|
CLOSED: [2016-11-06 Sun 11:25]
|
|
|
:PROPERTIES:
|
|
@@ -523,10 +537,7 @@ Finally, this is what puts the application together. Placing each function in i
|
|
|
#+Caption: Packaging
|
|
|
#+Name: packaging
|
|
|
#+BEGIN_SRC sh :tangle "~/bin/library" :shebang "#!/bin/sh"
|
|
|
- LIBRARY_FILE=~/.library/library.rec
|
|
|
- LIBRARY_DIRECTORY=~/.library
|
|
|
- GIT=detect
|
|
|
- export LIBRARY_DEFAULT_FIELDS=${LIBRARY_DEFAULT_FIELDS:-ID,Title,Author,LCCN,Location,Course}
|
|
|
+ <<configuration>>
|
|
|
|
|
|
<<help-message>>
|
|
|
|