File: CPTARTOWEBDIR

package info (click to toggle)
dwarfutils 20201201-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,868 kB
  • sloc: ansic: 104,667; sh: 5,947; cpp: 4,675; python: 878; makefile: 646; awk: 11
file content (40 lines) | stat: -rwxr-xr-x 650 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
#!/bin/sh
# Pass in the name of the new release
# with any appropriate path designation
# name should be <path>/*libdwarf-*.tar.gz

if [ $# -ne 1 ]:
then
  echo Requires path to a tar.gz file
  exit 1
fi
full=$1
b=`basename $full`
t=/home/davea/web4/gweb/pagedata
if [ -f "$t/$b" ]
then
  echo "file already present, running cmp."
  cmp "$full"  "$t/$b" >/dev/null
  if [ $? -ne 0 ]
  then
    echo "Not the same file content. Fix this!"
    exit 1
  else
    echo "Content already there. Ok."
  fi
else
  echo "Copied $full  to $t/$b"
  cp "$full"  "$t/$b"
fi
set -x
ls -l "$t/$b"
md5sum "$t/$b"
echo " "
sha512sum "$t/$b" | fold -w 32
exit 0