File: getNewVersion

package info (click to toggle)
astap-cli 2025.10.08-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,224 kB
  • sloc: pascal: 7,668; sh: 292; makefile: 4
file content (47 lines) | stat: -rwxr-xr-x 944 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

# get new astap-cli version from mercury repository at sourceforge

HG=`command -v hg`
UNZIP=`command -v unzip`
REPO="http://hg.code.sf.net/p/astap-program/code"

if [ -z "$HG" ]; then
  echo "E: hg not found"
  exit 1
fi
if [ -z "$UNZIP" ]; then
  echo "E: unzip not found"
  exit 1
fi

mkdir astap-cli-upstream
cd astap-cli-upstream
$HG clone $REPO
cd code
version=`LANG=C $HG log|grep summary|head -1|awk -F"'" '{printf("%s",$2)}'|tr -d "v"`
echo "I: version: $version"
cd ..
# prepare orig source
sourcedir=astap-cli_$version.orig

mv code $sourcedir
cd $sourcedir
  # remove some stuff not needed for astap package
  rm -rf bayer_test_pattern dcraw_modification debian_package_scripts documentation inno_scripts libraw_mod
  rm -rf .hg
  rm *
  cd star_database_creation
    $UNZIP *
    rm *.zip
  cd ..
  cd command-line_version
  mv * ..
  cd ..
  rmdir command-line_version
cd ..

tar -czf $sourcedir.tar.gz $sourcedir