Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save kawasaki2013/6d9e0db2cabe367de592187a2eb0c053 to your computer and use it in GitHub Desktop.

Select an option

Save kawasaki2013/6d9e0db2cabe367de592187a2eb0c053 to your computer and use it in GitHub Desktop.
#!/bin/bash
CURRENT_DIR="$( dirname "${BASH_SOURCE[0]}" )"
export PATH=${PATH/$CURRENT_DIR}
args=()
for arg in "$@"; do
if [[ "$arg" =~ ^@.* ]]; then
file="${arg#@}"
if [ -f "$file" ]; then
for a in $(cat "$file"); do
args+=("$a")
done
continue
fi
fi
args+=("$arg")
done
exec ${FORTIFY_SOURCEANALYZER:-sourceanalyzer} -b ${FORTIFY_BUILDID:-default} "$(basename "$0")" "${args[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment