forked from pool/quilt
Takashi Iwai
a5de1023e1
- Fix the series file consistency checker - Many fixes and improvements to the setup command - New option --fast for quilt setup (hackweek project) OBS-URL: https://build.opensuse.org/request/show/264454 OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=92
99 lines
2.3 KiB
Diff
99 lines
2.3 KiB
Diff
From: Jean Delvare <jdelvare@suse.de>
|
|
Subject: setup/inspect: Cleanups
|
|
Upstream: Committed (aa5d1389f7ce7ca2fc51e791ec33b68404fdea6b)
|
|
|
|
* Drop quotes that aren't needed and break syntax highlighting in some
|
|
editors.
|
|
* Coding style cleanups.
|
|
---
|
|
quilt/scripts/inspect.in | 23 +++++++++++++----------
|
|
quilt/setup.in | 6 +++---
|
|
2 files changed, 16 insertions(+), 13 deletions(-)
|
|
|
|
--- a/quilt/scripts/inspect.in
|
|
+++ b/quilt/scripts/inspect.in
|
|
@@ -65,7 +65,7 @@ else
|
|
specdir=$PWD
|
|
fi
|
|
|
|
-tmpdir="$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})"
|
|
+tmpdir=$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})
|
|
mkdir -p $tmpdir || exit 1
|
|
add_exit_handler "rm -rf $tmpdir"
|
|
mkdir -p $tmpdir/build
|
|
@@ -116,7 +116,7 @@ do
|
|
filetype="xz"
|
|
;;
|
|
*)
|
|
- filetype="$(file -b "$file")"
|
|
+ filetype=$(file -b "$file")
|
|
;;
|
|
esac
|
|
|
|
@@ -239,7 +239,8 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
-i|--input)
|
|
- if [ $# -ge 2 ]; then
|
|
+ if [ $# -ge 2 ]
|
|
+ then
|
|
echo "$2"
|
|
return
|
|
fi
|
|
@@ -372,12 +373,13 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
|
inputfile=$(unzip_input_file "$@")
|
|
;;
|
|
esac
|
|
- if [ -z "$inputfile" ]; then
|
|
- # put data from stdin into tmpfile
|
|
- cat > $tmpdir/data
|
|
+ if [ -z "$inputfile" ]
|
|
+ then
|
|
+ # put data from stdin into tmpfile
|
|
+ cat > $tmpdir/data
|
|
fi
|
|
|
|
- unpackfile="$(original_file ${inputfile:-$tmpdir/data})"
|
|
+ unpackfile=$(original_file ${inputfile:-$tmpdir/data})
|
|
if [ -n "$unpackfile" ]
|
|
then
|
|
case "${0##*/}" in
|
|
@@ -403,10 +405,11 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
|
fi
|
|
|
|
PATH=${PATH#*:}
|
|
- if [ -n "$inputfile" ]; then
|
|
- ${0##*/} "$@"
|
|
+ if [ -n "$inputfile" ]
|
|
+ then
|
|
+ ${0##*/} "$@"
|
|
else
|
|
- ${0##*/} "$@" < $tmpdir/data
|
|
+ ${0##*/} "$@" < $tmpdir/data
|
|
fi
|
|
EOF
|
|
|
|
--- a/quilt/setup.in
|
|
+++ b/quilt/setup.in
|
|
@@ -205,7 +205,7 @@ case "$1" in
|
|
"# Source: "*)
|
|
shift 2
|
|
source="$@"
|
|
- filetype="$(file -b "$source")"
|
|
+ filetype=$(file -b "$source")
|
|
case "$filetype" in
|
|
Zip*)
|
|
echo "unzip ${tar_dir:-.} ${source// /\\ }"
|
|
@@ -273,9 +273,9 @@ while read tag dir arg1 arg2
|
|
do
|
|
case "$tag" in
|
|
tar|unzip)
|
|
- tar_dir="$dir"
|
|
+ tar_dir=$dir
|
|
[ "$tar_dir" = . ] && tar_dir=
|
|
- tar_file="$arg1"
|
|
+ tar_file=$arg1
|
|
;;
|
|
patch)
|
|
if [ ! -e "$prefix$dir/$QUILT_PATCHES" ]
|