createShScript proposal added

svn path=/nixpkgs/trunk/; revision=9609
This commit is contained in:
Marc Weber 2007-11-08 19:03:23 +00:00
parent 4e8bf82213
commit a589bdf7db

View File

@ -28,6 +28,17 @@ addToSearchPath()
addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@"
}
# Would adding -e to echo be useful? ( "\n" -> newline. useful for one liners )
# usage:
# createShScript $out/bin/yourscript \
# "#!/bin/sh
# echo Hello World"
# should we add ensureDir $(basename $1) ?
createShScript(){
echo "$2" > "$1"
chmod +x "$1"
}
# Set up the initial path.
PATH=
for i in $NIX_GCC @initialPath@; do