* rebased llvm/hotfix-sparcv9-not-64.diff
[t2sde.git] / scripts / Create-SrcTar
blob11f7e3a64e13b807b9367950bcf7b4762f52fd12
1 #!/usr/bin/env bash
3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # T2 SDE: scripts/Create-SrcTar
5 # Copyright (C) 2004 - 2023 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # This Copyright note is generated by scripts/Create-CopyPatch,
9 # more information can be found in the files COPYING and README.
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License version 2.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 eval "`grep -A 10 '\[BEGIN\]' scripts/parse-config | grep -B 10 '\[END\]'`"
17 echo -n 'Creating source tar ... '
19 # Create temp source base dir
21 src="`mktemp -d -p $PWD src.srctar.XXXXXXXXXX`"
22 rm -rf $src/t2-src-$sdever
23 mkdir -p $src/t2-src-$sdever
25 for x in scripts target misc package architecture doc
27 ln -s ../../$x $src/t2-src-$sdever/$x
28 done
30 # Create tar file
32 cd $src
33 tar --use-compress-program=bzip2 --owner root --group root \
34 --exclude .svn --exclude CVS -cf ${1:-t2-src-$sdever.tar.bz2} t2-src-$sdever/*/*
36 # Done.
38 cd $base
39 rm -rf $src/
40 du -sh ${1:-t2-src-$sdever.tar.bz2} | tr '\t' ' '