xref: /aosp_15_r20/external/libcap/gomods.sh (revision 2810ac1b38eead2603277920c78344c84ddf3aff)
1#!/bin/bash
2
3version="${1}"
4if [[ -z "${version}" ]]; then
5    echo "usage: supply a cap/psx module version to target"
6    exit 1
7fi
8
9for x in $(find . -name 'go.mod'); do
10    sed -i -e '[email protected]/\([^ ]*\) v.*$@kernel.org/\1 '"${version}@" "${x}"
11done
12