File: create-buildscript.sh

package info (click to toggle)
dpb 0.9.9
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,344 kB
  • sloc: sh: 77; makefile: 19
file content (34 lines) | stat: -rwxr-xr-x 740 bytes parent folder | download
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/bash

set -e

scripts="
  build-gbp.sh
  build-gbp-java-plugin.sh
  build-gbp-maven-plugin.sh
  build-gbp-webext-plugin.sh
  build-gbp-python-plugin.sh
"

cat Title.nw Part1.nw Part2.nw Part3.nw Part4.nw Part5.nw Part6.nw > BuildWithGBPg.nw
#t=`date +%c`
# For building reprducible
t=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" -R)

function build_script()
{
  notangle -R"$script" BuildWithGBPg.nw > "$script"
  sed --in-place \
    --expression='s/This is the end, my friend[[:cntrl:]]*/This is the end, my friend/' \
    "$1"
  echo "#generated on $t" >> "$1"
  chmod ugo+x "$1"
  bash -n "$1"
}

for script in $scripts; do
   build_script "$script"
done

# Remove auxillary file BuildWithGBPg.nw
rm BuildWithGBPg.nw