File: get-orig-source

package info (click to toggle)
hepmc3 3.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 14,116 kB
  • sloc: fortran: 66,849; cpp: 13,604; ansic: 1,374; xml: 109; sh: 72; makefile: 33
file content (31 lines) | stat: -rwxr-xr-x 563 bytes parent folder | download
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
28
29
30
31
#!/bin/bash
# XXX: please use "uscan" from "devscripts" package instead.

set -e

[ $# == 3 ]

url="http://lcgapp.cern.ch/project/simu/HepMC/download"
url="http://hepmc.web.cern.ch/hepmc/releases"
ver="$2"

pkgdir="hepmc3-$ver.orig"
pkg="hepmc3_$ver.orig.tar.gz"

uppkgdir="HepMC3-$ver"
uppkg="HepMC3-$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"