24 lines
586 B
Bash
Executable file
24 lines
586 B
Bash
Executable file
#!/bin/sh
|
|
|
|
WPROF_CHECKOUT=$1
|
|
|
|
pushd $1 >/dev/null
|
|
|
|
git submodule status --cached
|
|
|
|
echo if you see a '+',
|
|
echo first do a \`git submodule update --init --recursive\`
|
|
read
|
|
|
|
WPROF_COMMIT=$(git rev-parse HEAD)
|
|
echo %global wprof_commit ${WPROF_COMMIT}
|
|
|
|
for d in blazesym bpftool libbpf strobelight-libs usdt vmlinux.h; do
|
|
PREFIX=$(echo $d | sed -e 's|-|_|g' | sed -e 's|\.|_|g')
|
|
COMMIT=$(git -C $d rev-parse HEAD)
|
|
DATE=$(git -C $d show --no-patch --format=%cd --date=format:%Y%m%d)
|
|
echo %global ${PREFIX}_commit ${COMMIT}
|
|
echo %global ${PREFIX}_date ${DATE}
|
|
done
|
|
|
|
popd >/dev/null
|