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