File: gomods.sh

package info (click to toggle)
libcap2 1%3A2.75-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,068 kB
  • sloc: ansic: 9,181; sh: 1,138; makefile: 812; cpp: 45; asm: 16
file content (11 lines) | stat: -rwxr-xr-x 256 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
#!/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