[HTTPS-Everywhere] Make the shell script more portable

Eitan Adler lists at eitanadler.com
Tue Oct 5 17:12:00 PDT 2010


Not all operating systems have bash located in /bin. For example the
FreeBSD project does not have have bash installed by default.

The following patch allows the makexpi.sh file run on nearly any POSIX
system (I know of zero operating systems that don't have env in
/usr/bin)

diff --git a/makexpi.sh b/makexpi.sh
old mode 100644
new mode 100755
index 7791d0d..c3fee6f
--- a/makexpi.sh
+++ b/makexpi.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 APP_NAME=https-everywhere
 VERSION=`grep em:version src/install.rdf | sed -e 's/[<>]/     /g' | cut -f3`
 XPI_NAME=$APP_NAME-$VERSION.xpi

-- 
Eitan Adler



More information about the HTTPS-everywhere mailing list