summaryrefslogtreecommitdiff
path: root/waterfox/waterfox-FreeBSD-patches-snapshot.sh
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-16 00:29:27 +0000
committerB Stack <bgstack15@gmail.com>2018-09-16 00:29:27 +0000
commit06c2a09edcb5cd71519fe13fb3047f2a2bdb47d0 (patch)
tree1661bae9f608448fed9832ca8aaa91891a2a9daa /waterfox/waterfox-FreeBSD-patches-snapshot.sh
parentMerge branch 'add-ublock' into 'master' (diff)
parentadd waterfox-ublock-origin and fix palemoon-ub (diff)
downloadstackrpms-06c2a09edcb5cd71519fe13fb3047f2a2bdb47d0.tar.gz
stackrpms-06c2a09edcb5cd71519fe13fb3047f2a2bdb47d0.tar.bz2
stackrpms-06c2a09edcb5cd71519fe13fb3047f2a2bdb47d0.zip
Merge branch 'add-waterfox' into 'master'
Add waterfox and its ublock-origin See merge request bgstack15/stackrpms!8
Diffstat (limited to 'waterfox/waterfox-FreeBSD-patches-snapshot.sh')
-rwxr-xr-xwaterfox/waterfox-FreeBSD-patches-snapshot.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/waterfox/waterfox-FreeBSD-patches-snapshot.sh b/waterfox/waterfox-FreeBSD-patches-snapshot.sh
new file mode 100755
index 0000000..b94f850
--- /dev/null
+++ b/waterfox/waterfox-FreeBSD-patches-snapshot.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -e
+
+module=$(basename "$0" -snapshot.sh)
+snaproot="https://svn.freebsd.org/ports/head/www/waterfox/files"
+
+tmp=$(mktemp -d)
+
+trap cleanup EXIT
+cleanup() {
+ set +e
+ ([ -z "${tmp}" ] || [ ! -d "${tmp}" ]) || rm -rf "${tmp}"
+}
+
+unset CDPATH
+unset SNAP_COOPTS
+pwd=$(pwd)
+snap=${snap:-$(date +%Y%m%d)}
+
+[ "${snap}" = "$(date +%Y%m%d)" ] || SNAP_COOPTS="-r {$snap}"
+if [ -n "${rev}" ] ; then
+ SNAP_COOPTS="-r ${rev}"
+ snap="${rev}"
+fi
+
+pushd "${tmp}"
+ svn co ${SNAP_COOPTS} ${snaproot} ${module}
+ rev=$(svnversion "${module}")
+ rev="${rev//[!0-9]/}"
+ mv "${module}" "${module}-r${rev}"
+ tar -Jcf "${pwd}/${module}-r${rev}.tar.xz" --exclude=.svn "${module}-r${rev}"
+popd >/dev/null
bgstack15