Skip to content

Instantly share code, notes, and snippets.

@andreldm
Created March 6, 2015 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreldm/efe992a2a93b705363fd to your computer and use it in GitHub Desktop.
Save andreldm/efe992a2a93b705363fd to your computer and use it in GitHub Desktop.
AUR Atom Package Updater
#!/bin/bash
if [ "$1" = "clean" ]; then
find . \
! -name update.sh \
! -name atom-python.patch \
! -name PKGBUILD \
-type f -delete
find . ! -name . -type d -exec rm -r {} +
exit 0
fi
sed -i "s/pkgver=.*/pkgver=0.$1.0/g" PKGBUILD
makepkg -si
if [ $? -eq 1 ]; then
md5=`md5sum atom-amd64.deb | cut -f1 -d" "`
sed -i "s/md5sums=.*/md5sums=('$md5'/g" PKGBUILD
makepkg -si
fi
mkaurball
burp atom-editor-bin-0.$1.0-1.src.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment