Skip to content

Commit

Permalink
- I forgot /bin/sh on ubuntu is a trashpile.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordansissel committed Oct 11, 2011
1 parent 6c272a7 commit 246e53a
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/Makefile
Expand Up @@ -5,7 +5,7 @@ test: $(TESTS)

.PHONY: $(TESTS)
$(TESTS):
@sh test.sh $@
@bash test.sh $@

clean:
rm *.deb *.rpm *.gem
6 changes: 3 additions & 3 deletions test/dir-deb-with-prefix.out
Expand Up @@ -3,17 +3,17 @@
./opt/foo/
./opt/foo/bar/
./opt/foo/bar/a/
./opt/foo/bar/a/e/
./opt/foo/bar/a/d/
./opt/foo/bar/a/d/hello
./opt/foo/bar/a/e/
./opt/foo/bar/a/f/
./opt/foo/bar/a/hello
./opt/foo/bar/b/
./opt/foo/bar/b/e/
./opt/foo/bar/b/d/
./opt/foo/bar/b/e/
./opt/foo/bar/b/f/
./opt/foo/bar/c/
./opt/foo/bar/c/e/
./opt/foo/bar/c/d/
./opt/foo/bar/c/d/hello
./opt/foo/bar/c/e/
./opt/foo/bar/c/f/
4 changes: 2 additions & 2 deletions test/dir-deb-with-prefix.test
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

run() {
mkdir -p $tmpdir/{a,b,c}/{d,e,f}
Expand All @@ -11,7 +11,7 @@ run() {
fpm -s dir -t deb -n testing -a all --prefix $prefix -C $tmpdir

file=testing_1.0_all.deb
dpkg -c $file | fex '{6:}' > $output
dpkg -c $file | awk '{$1=$2=$3=$4=$5="";print}' | sed -e 's/^ *//' | sort > $output

rm $file
}
4 changes: 2 additions & 2 deletions test/dir-deb.test
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

run() {
mkdir -p $tmpdir/{a,b,c}/{d,e,f}
Expand All @@ -11,7 +11,7 @@ run() {
fpm -s dir -t deb -n testing -a all $tmpdir

file=testing_1.0_all.deb
dpkg -c $file | fex '{6:}' | sort > $output
dpkg -c $file | awk '{$1=$2=$3=$4=$5="";print}' | sed -e 's/^ *//' | sort > $output
#ar p $file data.tar.gz | tar -ztf - | sort > $output
sed -e "s,TMPDIR,$(basename $tmpdir)," $expected.template > $expected

Expand Down
2 changes: 1 addition & 1 deletion test/dir-rpm-with-prefix.test
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

run() {
mkdir -p $tmpdir/{a,b,c}/{d,e,f}
Expand Down
2 changes: 1 addition & 1 deletion test/dir-rpm.test
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

run() {
mkdir -p $tmpdir/{a,b,c}/{d,e,f}
Expand Down
3 changes: 2 additions & 1 deletion test/gem-deb.test
@@ -1,10 +1,11 @@
#!/bin/bash
RAILS_VERSION=3.1.0

run() {
fpm -s gem -t deb -v $RAILS_VERSION rails

file=rubygem-rails_${RAILS_VERSION}_all.deb
dpkg -c $file | fex '{6:}' > $output
dpkg -c $file | awk '{$1=$2=$3=$4=$5="";print}' | sed -e 's/^ *//' | sort > $output
rm $file
}

Expand Down
2 changes: 1 addition & 1 deletion test/test.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

fpm() {
../bin/fpm "$@" > $debugout 2> $debugerr
Expand Down

1 comment on commit 246e53a

@tabletcorry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes #!/usr/bin/env bash is even better, since it allows newer/specific versions of bash to be used.

Please sign in to comment.