1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/pkgs/build-support/upstream-updater/urls-from-page.sh
Michael Raskin 5a6e313abf Add an automated updater script and definitions for its use for WebKit
svn path=/nixpkgs/trunk/; revision=16816
2009-08-23 22:10:08 +00:00

13 lines
291 B
Bash
Executable file

#! /bin/sh
url="$1"
protocol="${url%%:*}"
path="${url#$protocol://}"
server="${path%%/*}"
relpath="${path#$server}"
echo "URL: $url" >&2
curl -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]="([^"]*)"/\n+\1\n-/g' | \
sed -e '/^-/d; s/^[+]//; /^#/d;'"s/^\\//$protocol:\\/\\/$server\\//g"