File: make-origtar

package info (click to toggle)
context-modules 20220508-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,464 kB
  • sloc: xml: 1,873; sh: 35; makefile: 34
file content (43 lines) | stat: -rw-r--r-- 1,076 bytes parent folder | download | duplicates (5)
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
#!/bin/bash
#
# create .orig.tar.gz for context-modules package
#

if [ "$1" = "-p" ] ; then
  tlnetloc=/home/norbert/public_html/tlpretest/archive
else
  tlnetloc=/home/norbert/public_html/tlnet/archive
fi

package=context-modules
vers=`date +'%Y%m%d'`
basedir=${package}-$vers
if [ -r $basedir ] ; then
  echo $basedir exists, exiting.
  exit 1
fi
mkdir $basedir
for i in `cat debian/included-ctx-modules`; do
  if [ -r $tlnetloc/$i.tar.xz ] ; then
    echo $i.tar.xz
    tar -C $basedir -xf $tlnetloc/$i.tar.xz
  else
    echo "WARNING: missing $tlnetloc/$i.tar.xz!"
  fi
  if [ -r $tlnetloc/$i.source.tar.xz ] ; then
    echo $i.source.tar.xz
    tar -C $basedir -xf $tlnetloc/$i.source.tar.xz
  fi
  if [ -r $tlnetloc/$i.doc.tar.xz ] ; then
    echo $i.doc.tar.xz
    tar -C $basedir -xf $tlnetloc/$i.doc.tar.xz
  fi
done
if [ -r ${package}_$vers.orig.tar.gz ] ; then
  echo "${package}_$vers.orig.tar.gz present, not creating new one"
  echo "be aware that there might be conflicts between packaged versions"
  exit 1
fi
tar -czf ${package}_$vers.orig.tar.gz $basedir