Quellcode durchsuchen

Switch to bash, use a better read call

Samuel W. Flint vor 1 Jahr
Ursprung
Commit
c6adf5e9ee
1 geänderte Dateien mit 8 neuen und 15 gelöschten Zeilen
  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>>