Check Env Dep: Do not require Bash
Before this update `kdb run_all` would fail, if the current system does
not include the `bash` shell.
-#!/usr/bin/env bash
+#!/usr/bin/env sh
OLD_IFS="$IFS"
IFS="$(printf '\n+')"
@@ -29,7 +29,12 @@ for env in $ENV; do
NEW_VALUE=$(generate_random_string)
export "$NAME"="$NEW_VALUE" > /dev/null 2>&1
NEW_PATHS="$($KDB mount-list-all-files 2> /dev/null)"
- DIFF="$(comm -3 <(echo "$ORIG_PATHS" | sort 2> /dev/null) <(echo "$NEW_PATHS" | sort 2> /dev/null))"
+ ORIG_PATHS_FILE="$(mktemp)"
+ NEW_PATHS_FILE="$(mktemp)"
+ echo "$ORIG_PATHS" | sort 2> /dev/null > "$ORIG_PATHS_FILE"
+ echo "$NEW_PATHS" | sort 2> /dev/null > "$NEW_PATHS_FILE"
+ DIFF="$(comm -3 "$ORIG_PATHS_FILE" "$NEW_PATHS_FILE")"
+ rm "$ORIG_PATHS_FILE" "$NEW_PATHS_FILE"
if [ ! -z "$DIFF" ]; then
echo "$NAME influences $DIFF"
fi
