| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# this script builds bin/staticperl |
| 4 |
# this is not done at install time normally, to allow people to install the script |
| 5 |
# without a working perl. |
| 6 |
|
| 7 |
if |
| 8 |
( |
| 9 |
IFS= |
| 10 |
while read -r line; do |
| 11 |
if [ "${line###CAT }" != "$line" ]; then |
| 12 |
cat "${line###CAT }" |
| 13 |
else |
| 14 |
printf -- "%s\n" "$line" |
| 15 |
fi |
| 16 |
done |
| 17 |
) <staticperl.sh >bin/staticperl~ |
| 18 |
then |
| 19 |
chmod 755 bin/staticperl~ |
| 20 |
if cmp -s bin/staticperl~ bin/staticperl; then |
| 21 |
rm bin/staticperl~ |
| 22 |
else |
| 23 |
mv bin/staticperl~ bin/staticperl |
| 24 |
fi |
| 25 |
fi |