skopeo/hack/libdm_tag.sh
Doug Rabson 804f7c249d Avoid hard-coding the location of bash
On FreeBSD, bash lives in /usr/local/bin/bash. These scripts don't
really depend on bash so could be changed to /bin/sh.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-05-10 11:24:45 +01:00

15 lines
301 B
Bash
Executable File

#!/usr/bin/env bash
tmpdir="$PWD/tmp.$RANDOM"
mkdir -p "$tmpdir"
trap 'rm -fr "$tmpdir"' EXIT
cc -c -o "$tmpdir"/libdm_tag.o -x c - > /dev/null 2> /dev/null << EOF
#include <libdevmapper.h>
int main() {
struct dm_task *task;
return 0;
}
EOF
if test $? -ne 0 ; then
echo libdm_no_deferred_remove
fi