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!"