summarylogtreecommitdiffstats
path: root/update_pkg
blob: 0f745d58cb1d6b15479d438bda401dc7eb6d94d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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!"