Patch get-repository.sh [WAS] addition to the documentation

J offlineimap at 927589452.de
Sun Jan 29 11:17:09 UTC 2017


On 17-01-29 11:41:28, J wrote:
> On 17-01-29 21:04:40, Cameron Simpson wrote:
> > On 29Jan2017 09:30, J <offlineimap at 927589452.de> wrote:
> > 
> > > and i am still using the env variable because it is AFAIK the new
> > > standard way
> > 
> > No, it is not "the new standard way", it is just the standard hack for when
> > you don't know the exact (fixed) path to an executable. For example, bash
> > might be in /bin or /usr/local/bin or somewhere else (or, my typical
> > concern, not present).
> > 
> > Whereas /bin/sh is _always_ in exactly that place. It is even a POSIX
> > requirement. So you can always go:
> > 
> >  #!/bin/sh
> > 
> > because it never moves.
> > 
> > The "env variable" isn't really any better - it totally relies on the "env"
> > command being exactly where you say. With /bin/sh you never need that hack.
> Thanks for clearing that up for me

did now change to /bin/sh

Greets
J
-------------- next part --------------
diff --git a/scripts/get-repository.sh b/scripts/get-repository.sh
index 4258e8f..5e7df38 100755
--- a/scripts/get-repository.sh
+++ b/scripts/get-repository.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 # Licence: this file is in the public domain.
 #
@@ -10,7 +10,7 @@ github_remote=$2
 #
 # TODO
 #
-function final_note () {
+final_note () {
 	cat <<EOF
 
 Now, you can fork the repository into Github from $2
@@ -22,7 +22,7 @@ and add a reference to it in your local copy:
 EOF
 }
 
-function setup () {
+setup () {
 	target_dir=$1
 	remote_url=$2
 
@@ -49,7 +49,7 @@ function setup () {
 	fi
 }
 
-function configure_website () {
+configure_website () {
 	renderer='./render.sh'
 
 	echo "Found Github username: '$1'"
@@ -65,7 +65,7 @@ function configure_website () {
 	fi
 }
 
-function configure_wiki () {
+configure_wiki () {
 	:	# noop
 }
 


More information about the OfflineIMAP-project mailing list