libcap/gomods.sh
Andrew G. Morgan 91455fd109 Add a handy update script for the various go.mod files.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2021-05-24 11:50:15 -07:00

12 lines
256 B
Bash
Executable File

#!/bin/bash
version="${1}"
if [[ -z "${version}" ]]; then
echo "usage: supply a cap/psx module version to target"
exit 1
fi
for x in $(find . -name 'go.mod'); do
sed -i -e 's@kernel.org/\([^ ]*\) v.*$@kernel.org/\1 '"${version}@" "${x}"
done