summaryrefslogtreecommitdiff
path: root/gomods.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gomods.sh')
-rwxr-xr-xgomods.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/gomods.sh b/gomods.sh
new file mode 100755
index 0000000..890cccd
--- /dev/null
+++ b/gomods.sh
@@ -0,0 +1,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