mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

66 lines
1.9 KiB

#!/bin/bash
#
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/scripts/Create-SrcTar
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if [ "$1" == -help ] ; then
echo
echo "Usage: ./scripts/Create-SrcTar [tar-bz2-filename]"
echo
echo " Create a .tar.bz2 file containing the ROCK Linux sources. This script is"
echo " used by the ROCK Linux core developers when releasing snapshots or releases."
echo ; exit
fi
eval "`grep -A 10 '\[BEGIN\]' scripts/parse-config | grep -B 10 '\[END\]'`"
base=${base:-${PWD}}
filename="$base/rock-src-$rockver.tar.bz2"
[ -z "$1" ] || filename="$1"
topld=$( basename $filename )
topld=${topld%.tar.bz2}
echo -n 'Creating source tar ... '
# Create temp source base dir
#
src="`mktemp -d -p $PWD src.srctar.XXXXXXXXXX`"
rm -rf $src/$topld
mkdir -p $src/$topld
#
for x in scripts target misc package architecture Documentation
do
ln -s ../../$x $src/$topld/$x
done
# Create tar file
#
cd $src
tar --use-compress-program=bzip2 --owner root --group root \
--exclude .svn --exclude CVS -cf $filename $topld/*/*
# Done.
#
cd $base
rm -rf $src/
du -sh $filename | tr '\t' ' '