14 lines
588 B
Text
14 lines
588 B
Text
|
#/usr/bin/env fish
|
||
|
|
||
|
set UNPATCHED_SOURCE_FILE $argv[1]
|
||
|
set PATCHED_SOURCE_FILE $argv[2]
|
||
|
set ORIG_PATH "$PWD/alfa:$PWD/bravo"
|
||
|
|
||
|
set RESULT_PATH_FROM_UNPATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $UNPATCHED_SOURCE_FILE; echo \"\$PATH\"")
|
||
|
set RESULT_PATH_FROM_PATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $PATCHED_SOURCE_FILE; echo \"\$PATH\"")
|
||
|
|
||
|
if test "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED"
|
||
|
echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2
|
||
|
exit 1
|
||
|
end
|