5 echo "Create plain patch list from list-XXX and XXX.spec"
6 echo "Usage: -d|--patch_dir Virtuozzo/kernel-patches/<PATCH_DIR> "
7 echo " -s|--spec_file <SPEC_FILE>"
8 echo " -l|--list listname script will it as list-<LIST_NAME>"
9 echo " -r|--revision kernel-ve cvs revision tag"
10 echo " -c make local copy for patches"
11 echo " -u make cvs update before."
17 while [ $# -gt 0 ]; do
54 if [ -z "$list" ]; then
55 echo "list not defined"
59 if [ -z "$spec" ]; then
60 echo "spec not defined"
63 if [ -z "$revision" ]; then
64 echo "revision not defined"
68 if [ -z "$patch_dir" ]; then
69 echo "patch_dir not defined"
74 echo "revision: $revision"
75 echo "patch_dir: $patch_dir"
84 cvs up kernel-patches
/$patch_dir
85 cvs up kernel-ve
/kernel-ve
89 function update_makefile_version
92 if [ ! -f "$GUILT_DIR/$branch/series" ]; then
93 die
"$GUILT_DIR/$branch/series does not exist. Aborting."
97 cp Makefile Makefile.vers
98 sed -e "s/\\(^EXTRAVERSION =\\)[^\$]*\$/\\1 -${lnum//-shadow/}/" \
99 -e "s/\\(^EXTRAVERSION =\\) [^\$]\\+\\$/\\1 -${lnum//-shadow/}-\$/" \
100 Makefile.vers
> Makefile
102 git-diff Makefile
> diff-update-uname-to-
$lnum
103 git-checkout Makefile
104 mv diff-update-uname-to-
$lnum $GUILT_DIR/$branch ||
exit
105 echo diff-update-uname-to-
$lnum >> $GUILT_DIR/$branch/series
108 function make_quilt_tree
{
113 if [ ! -f "$GUILT_DIR/$branch/series" ]; then
114 die
"$GUILT_DIR/$branch/series does not exist. Aborting."
116 if [ ! -f "$list" ]; then
117 echo "No such list $list_file"
121 if [ ! -f "$spec" ]; then
122 echo "No such spec $spec_file"
125 vzt-show-list
-l $list -s $spec -p .
> $GUILT_DIR/$branch/series.tmp ||
exit
127 ln -s `dirname $list` $GUILT_DIR/$branch/patches
128 ln -s `dirname $spec` $GUILT_DIR/$branch/vzmod
129 if [ $local_copy == 1 ]; then
130 cp -r $GUILT_DIR/$branch/patches
/ $GUILT_DIR/$branch/patches.copy
/
131 cp -r $GUILT_DIR/$branch/vzmod
/ $GUILT_DIR/$branch/vzmod.copy
/
133 mv $GUILT_DIR/$branch/series.tmp
$GUILT_DIR/$branch/series ||
exit
136 if [ $update == 1 ]; then
137 update_cvs
$VZCVSROOT $patch_dir $revision
140 #update_makefile_version $list-partial
141 make_quilt_tree
$VZCVSROOT/kernel-patches
/$patch_dir/list-
$list \
142 $VZCVSROOT/kernel-ve
/kernel-ve
/$spec.spec
$local_copy
143 #update_makefile_version $list