Browse Source

Switch to bash, use a better read call

Samuel W. Flint 1 year ago
parent
commit
c6adf5e9ee
1 changed files with 8 additions and 15 deletions
  1. 8 15
      library.org

+ 8 - 15
library.org

@@ -260,20 +260,13 @@ This handles git as needed, by first checking to see if the first argument is ~i
 #+BEGIN_SRC sh
   function add_single {
       if [[ $# -lt 7 ]] ; then
-          echo -n "Title: "
-          read TITLE
-          echo -n "Author: "
-          read AUTHOR
-          echo -n "LCCN: "
-          read LCCN
-          echo -n "Copyright: "
-          read COPYRIGHT
-          echo -n "Publisher: "
-          read PUBLISHER
-          echo -n "ISBN: "
-          read ISBN
-          echo -n "Location: "
-          read LOCATION
+          read -e -p "Title: " TITLE
+          read -e -p "Author: " AUTHOR
+          read -e -p "LCCN: " LCCN
+          read -e -p "Copyright Year: " COPYRIGHT
+          read -e -p "Publisher: " PUBLISHER
+          read -e -p "ISBN: " ISBN
+          read -e -p "Location: " LOCATION
       else
           TITLE=$1
           shift
@@ -569,7 +562,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"
+#+BEGIN_SRC sh :tangle "~/bin/library" :shebang "#!/usr/bin/env bash"
   <<configuration>>
 
   <<help-message>>