summaryrefslogtreecommitdiffstats
path: root/release/pack
blob: 50d4ad52ce294de4c9742ccf1cf6ab15a33fea55 (plain)
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
#!/bin/bash
# This is the main script.
# Call it with the package name as argument, like:  ./pack tdelibs
# Make sure to update the version numbers inside "common" first.
#
# Environment variables that can be set
# $scriptpath = path to kde-common/release (by default: .. )

source `dirname $0`/common $1 $2

MEINPROCPATH=`type -p meinproc`
if test -f "$MEINPROCPATH"; then
  MEINPROCPATH=`dirname $MEINPROCPATH`
fi
if test -n "$MEINPROCPATH"; then
  export PATH=$MEINPROCPATH:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
  echo "PATH changed to $PATH"
fi
test -n "$package" || { echo "requires modulename as parameter"; exit 1; }
test -d clean || { echo "create clean subdir with cvs checkout"; exit 1; }
test -d dirty || mkdir dirty || { echo "create empty subdir dirty"; exit 1; }
test -d sources || mkdir sources || { echo "create empty subdir sources"; exit 1; }
test -d sources-old || { echo "create empty subdir sources-old with reference files for xdelta"; exit 1; }
if test $isl10n -eq 1; then
  test -d sources/$package || mkdir sources/$package || { echo "create empty subdir sources/$package"; exit 1; }
fi

test -d clean/$package || { echo "clean/$package does not exist"; exit 1; }
test -d dirty/$package-$version && { echo "rm -rf dirty/$package-$version"; rm -rf dirty/$package-$version; }
test -d dirty/$package && { echo "rm -rf dirty/$package"; rm -rf dirty/$package; }

if test -z "$HARDLINKS"; then
  echo "cp -pr clean/$package dirty"
  cp -pr clean/$package dirty || exit 1
else
  echo "cp -prl clean/$package dirty"
  cp -prl clean/$package dirty || exit 1
fi

echo "cd dirty"
cd dirty || exit 1

# Anonymize checkout
echo "anon $package"
$scriptpath/anon $package || exit 1

if test -z "$DOINGSNAPSHOT"; then
  # Generate docu
  echo "docu $package"
  $scriptpath/docu $package 
fi

# Prepare for distribution
echo "dist $package"
$scriptpath/dist $package $version || exit 1

# Final packaging
echo "taritup $package"
$scriptpath/taritup $package $version || exit 1