Last active
August 29, 2015 14:00
-
-
Save cstorey/11141434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH := ./foo:$(PATH) | |
export PATH | |
foo: | |
mkdir -vp $@ | |
foo/bar: foo | |
printf "#!/bin/echo Hello\n" > [email protected] && chmod +x [email protected] && mv -v [email protected] $@ | |
runit_okay: foo/bar | |
echo $$PATH | |
sh -c 'bar' | |
runit_fail: foo/bar | |
echo $$PATH | |
bar | |
runit_env: foo/bar | |
echo $$PATH | |
env bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:; make runit_fail | |
mkdir -vp foo | |
printf "#!/bin/echo Hello\n" > foo/bar.tmp && chmod +x foo/bar.tmp && mv -v foo/bar.tmp foo/bar | |
foo/bar.tmp -> foo/bar | |
echo $PATH | |
./foo:/usr/bin:/opt/pkg/sbin:/opt/pkg/bin:/Users/cez/Library/Haskell/bin:/usr/local/heroku/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/Users/cez/bin | |
bar | |
make: bar: No such file or directory | |
make: *** [runit_fail] Error 1 | |
:; make runit_okay | |
echo $PATH | |
./foo:/usr/bin:/opt/pkg/sbin:/opt/pkg/bin:/Users/cez/Library/Haskell/bin:/usr/local/heroku/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/Users/cez/bin | |
sh -c 'bar' | |
Hello ./foo/bar | |
:; make runit_env | |
echo $PATH | |
./foo:/usr/bin:/opt/pkg/sbin:/opt/pkg/bin:/Users/cez/Library/Haskell/bin:/usr/local/heroku/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/Users/cez/bin | |
env bar | |
Hello ./foo/bar | |
:; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment