Rev 14 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16 | magnus | 1 | #!/bin/sh -e |
7 | magnus | 2 | ## bashisms.dpatch by Magnus Holmgren <holmgren@debian.org> |
3 | ## |
||
16 | magnus | 4 | ## DP: Change all shell references to /bin/bash to avoid problems |
5 | ## DP: when /bin/sh is not Bash. |
||
7 | magnus | 6 | |
16 | magnus | 7 | dpatch_patch() { |
8 | files=`grep -Rl '/bin/sh' scripts` |
||
9 | |||
10 | if [ ! -f debian/patched/patched-bashisms.tar.gz ]; then |
||
11 | tar -czf debian/patched/patched-bashisms.tar.gz $files |
||
12 | sed -ri -e 's#/bin/sh#/bin/bash#g' $files |
||
13 | fi |
||
14 | } |
||
15 | |||
16 | dpatch_unpatch() { |
||
17 | # Change line endings back to CRLF in files that had it in the tarball |
||
18 | tar -xzf debian/patched/patched-bashisms.tar.gz |
||
19 | } |
||
20 | |||
21 | DPATCH_LIB_NO_DEFAULT=1 |
||
22 | |||
23 | . /usr/share/dpatch/dpatch.lib.sh |