File: build-uploads.sh

package info (click to toggle)
offlineimap3 0.0~git20211018.e64c254%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,240 kB
  • sloc: python: 8,089; sh: 586; makefile: 81
file content (34 lines) | stat: -rwxr-xr-x 664 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
#
# vim: expandtab ts=2 :

WEBSITE_UPLOADS='./website/_uploads'

while true
do
  test -d .git && break
  cd ..
done

set -e

echo "make clean"
make clean >/dev/null
echo "make targz"
make targz >/dev/null

# Defined in the root Makefile.
version="$(./offlineimap.py --version)"
abbrev="$(git log --format='%h' HEAD~1..)"
targz="../offlineimap-v${version}-${abbrev}.tar.gz"

filename="offlineimap-v${version}.tar.gz"

mv -v "$targz" "${WEBSITE_UPLOADS}/${filename}"
cd "$WEBSITE_UPLOADS"
for digest in sha1 sha256 sha512
do
  target="${filename}.${digest}"
  echo "Adding digest ${WEBSITE_UPLOADS}/${target}"
  "${digest}sum" "$filename" > "$target"
done