Skip to content

Commit

Permalink
fix shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 18, 2024
1 parent f163e8d commit 769337c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/set-interpreter-same.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ mkdir -p "${SCRATCH}"
cp simple "${SCRATCH}"/

echo "set the same interpreter as the current one"
before_checksum=$(sha256sum ${SCRATCH}/simple)
before_checksum=$(sha256sum "${SCRATCH}/simple")
../src/patchelf --set-interpreter "${curInterpreter}" "${SCRATCH}/simple"
after_checksum=$(sha256sum ${SCRATCH}/simple)
after_checksum=$(sha256sum "${SCRATCH}/simple")

if [ "$before_checksum" != "$after_checksum" ]; then
echo "--set-interpreter should be NOP, but the file has been changed."
exit 1
fi

${SCRATCH}/simple
"${SCRATCH}/simple"

dummyInterpreter="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

echo "set the dummy interpreter"
before_checksum=$(sha256sum ${SCRATCH}/simple)
before_checksum=$(sha256sum "${SCRATCH}/simple")
../src/patchelf --set-interpreter "${dummyInterpreter}" "${SCRATCH}/simple"
after_checksum=$(sha256sum ${SCRATCH}/simple)
after_checksum=$(sha256sum "${SCRATCH}/simple")

if [ "$before_checksum" = "$after_checksum" ]; then
echo "--set-interpreter should be run, but the file has not been changed."
Expand All @@ -41,9 +41,9 @@ if "${SCRATCH}/simple"; then
fi

echo "set the same interpreter as the current one"
before_checksum=$(sha256sum ${SCRATCH}/simple)
before_checksum=$(sha256sum "${SCRATCH}/simple")
../src/patchelf --set-interpreter "${dummyInterpreter}" "${SCRATCH}/simple"
after_checksum=$(sha256sum ${SCRATCH}/simple)
after_checksum=$(sha256sum "${SCRATCH}/simple")

if [ "$before_checksum" != "$after_checksum" ]; then
echo "--set-interpreter should be NOP, but the file has been changed."
Expand Down

0 comments on commit 769337c

Please sign in to comment.