summarylogtreecommitdiffstats
path: root/update_pkg
diff options
context:
space:
mode:
Diffstat (limited to 'update_pkg')
-rwxr-xr-xupdate_pkg16
1 files changed, 16 insertions, 0 deletions
diff --git a/update_pkg b/update_pkg
new file mode 100755
index 000000000000..0f745d58cb1d
--- /dev/null
+++ b/update_pkg
@@ -0,0 +1,16 @@
+#!/usr/bin/env ruby
+
+new_sha = `makepkg -g`
+pkgbuild = File.readlines("PKGBUILD").map do |line|
+ if line =~ /\A\s*sha256sums/
+ new_sha
+ else
+ line
+ end
+end.join
+
+File.write("PKGBUILD", pkgbuild)
+system("makepkg --printsrcinfo > .SRCINFO")
+# puts new_sha
+puts "done!"
+