mirror of
https://github.com/danog/php.git
synced 2024-11-30 04:29:16 +01:00
d4616116cb
* Add Alpine 3.17 variant for PHP >= 8.1 Also remove Alpine 3.15 * Remove old Alpine 3.13 reference from Dockerfile-linux.template * Improve Alpine version matching in versions.sh
35 lines
587 B
Bash
Executable File
Generated
35 lines
587 B
Bash
Executable File
Generated
#!/bin/sh
|
|
set -e
|
|
|
|
dir=/usr/src/php
|
|
|
|
usage() {
|
|
echo "usage: $0 COMMAND"
|
|
echo
|
|
echo "Manage php source tarball lifecycle."
|
|
echo
|
|
echo "Commands:"
|
|
echo " extract extract php source tarball into directory $dir if not already done."
|
|
echo " delete delete extracted php source located into $dir if not already done."
|
|
echo
|
|
}
|
|
|
|
case "$1" in
|
|
extract)
|
|
mkdir -p "$dir"
|
|
if [ ! -f "$dir/.docker-extracted" ]; then
|
|
tar -Jxf /usr/src/php.tar.xz -C "$dir" --strip-components=1
|
|
touch "$dir/.docker-extracted"
|
|
fi
|
|
;;
|
|
|
|
delete)
|
|
rm -rf "$dir"
|
|
;;
|
|
|
|
*)
|
|
usage
|
|
exit 1
|
|
;;
|
|
esac
|