Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
21 lines
578 B
Bash
21 lines
578 B
Bash
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
UNPATCHED_SOURCE_FILE="$1"
|
|
PATCHED_SOURCE_FILE="$2"
|
|
ORIG_PATH="$PWD/alfa:$PWD/bravo"
|
|
RESULT_PATH_FROM_UNPATCHED="$(
|
|
PATH="$ORIG_PATH"; export PATH
|
|
. "$UNPATCHED_SOURCE_FILE"
|
|
echo "$PATH"
|
|
)"
|
|
RESULT_PATH_FROM_PATCHED="$(
|
|
PATH="$ORIG_PATH"; export PATH
|
|
. "$PATCHED_SOURCE_FILE"
|
|
echo "$PATH"
|
|
)"
|
|
if [ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]; then
|
|
echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr
|
|
exit 1
|
|
fi
|