File: get-orig-source

package info (click to toggle)
rivet 1.8.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 29,332 kB
  • ctags: 10,713
  • sloc: cpp: 59,356; sh: 11,294; python: 6,747; ansic: 1,751; makefile: 1,538
file content (27 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

set -e

[ $# == 3 ]

url="http://www.hepforge.org/archive/rivet"
ver="$2"

pkgdir="rivet-$ver.orig"
pkg="rivet_$ver.orig.tar.gz"

uppkgdir="Rivet-$ver"
uppkg="Rivet-$ver.tar.gz"

[ ! -f "../$uppkg" ] && wget "$url/$uppkg" -O "../$uppkg"

[ -d "$uppkgdir" ] && rm -rf "$uppkgdir"
tar xf "../$uppkg"

[ -d "$pkgdir" ] && rm -rf "$pkgdir"

mv "$uppkgdir" "$pkgdir"
rm -f "../$pkg"
tar -zcf "../$pkg" "$pkgdir"

rm -rf "$pkgdir"