File: BLDLIBDWARFTAR

package info (click to toggle)
dwarfutils 20180809-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,228 kB
  • sloc: ansic: 63,382; sh: 5,222; cpp: 4,041; makefile: 548; python: 445; awk: 11
file content (86 lines) | stat: -rwxr-xr-x 1,656 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/sh
#
#newpref sets directory name with date, more
#like normal linux packages.
l=`pwd`
echo $l
lb=`basename $l`
ld=`dirname $l`
#echo " lb: $lb"
#echo " ld: $ld"
cdtarg=.
sloc=$l/scripts
if [ x$lb = "xscripts" ]
then
  #echo "ld: $ld"
  ldb=`basename $ld`
  #echo "ldb: $ldb"
  if [ x$ldb = "xcode" ]
  then
     cdtarg=..
     sloc=$l
  else
     echo "Run from */code, not $l , giving up."
     exit 1
  fi
  cd $cdtarg
  if [ $? -ne 0 ]
  then
     echo "cd $cdtarg failed, giving up."
     exit 1
  fi
else
  if [ x$lb = "xcode" ]
  then
    cdtarg="."
  else
    echo "Run from */code, not $l , giving up."
    exit 1
  fi
  # No need to cd.
fi
l=`pwd`
#echo "Now at $l"
#echo "sloc $sloc"


if [ $# != 1 ]
then
	echo  Usage: BLDLIBDWARFTAR yyyymmdd
	echo  Example: BLDLIBDWARFTAR 20040108
	exit 1
fi
echo "This does not do UPDATEDWARFDUMPVERSION.sh"
echo "Make sure there are no unwanted files"
echo "in the code directories as all the files get"
echo "copied to the release tar file."
dat=$1

tmpf=dwarf
tmpdir=/var/tmp
# cptopublic knows /var/tmp/dwarf is the target
sh $sloc/CPTOPUBLIC nouv 
newpref=dwarf-${dat}
newf=libdwarf-${dat}.tar
echo src is $tmpdir/$tmpf tmp is $newpref target is $newf
echo ============  $newpref  $newf ==========

echo First create $tmpdir/$newpref with the latest source.
cd $tmpdir
if [ ! -d $tmpf ]
then
	echo No $tmpdir/dwarf present!  Do nothing.
	exit 0
fi
rm -rf $newpref

cp -rp $tmpf $newpref
# Alter date below before using.e
rm -f ${newf} ${newf}.gz
tar cf /var/tmp/$newf $newpref
gzip ${newf}
hm=/home/davea/web4/gweb/pagedata
cp  ${newf}.gz $hm
ls -l $tmpdir/${newf}.gz
ls -l $hm/${newf}.gz
exit 0