mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-14 10:48:04 +02:00
contrib/rpm: add script build_clean.sh to create clean RPM files
This commit is contained in:
parent
886366d0fd
commit
b322642a03
2 changed files with 37 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ setup_nmtui() {
|
|||
}
|
||||
|
||||
ORIGDIR="$(readlink -f "$PWD")"
|
||||
SCRIPTDIR="$(readlink -f "$(dirname "$0")")"
|
||||
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
|
||||
LOG "Change to directory \"$SCRIPTDIR\""
|
||||
cd "$SCRIPTDIR" || die "could not change into $SCRIPTDIR"
|
||||
GITDIR="$(cd "$SCRIPTDIR" && git rev-parse --show-toplevel || die "Could not get GITDIR")"
|
||||
|
|
|
|||
36
contrib/fedora/rpm/build_clean.sh
Executable file
36
contrib/fedora/rpm/build_clean.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
die() {
|
||||
echo "$*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# copy output also to logfile
|
||||
LOG() {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
|
||||
ORIGDIR="$(readlink -f "$PWD")"
|
||||
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
|
||||
GITDIR="$(cd "$SCRIPTDIR" && git rev-parse --show-toplevel || die "Could not get GITDIR")"
|
||||
|
||||
|
||||
[[ -x "$SCRIPTDIR"/build.sh ]] || die "could not find \"$SCRIPTDIR/build.sh\""
|
||||
|
||||
cd "$GITDIR" || die "could not change to $GITDIR"
|
||||
|
||||
# check for a clean working directory.
|
||||
# We ignore the /contrib directory, because this is where the automation
|
||||
# scripts and the build results will be.
|
||||
if [[ "x$(git clean -ndx -e /contrib )" != x ]]; then
|
||||
die "The working copy is not clean. Refuse to run. Try git clean -e /contrib -dx -n"
|
||||
fi
|
||||
|
||||
./autogen.sh --enable-gtk-doc || die "Error autogen.sh"
|
||||
make -j 10 || die "Error make"
|
||||
|
||||
make distcheck || die "Error make distcheck"
|
||||
|
||||
"$SCRIPTDIR"/build.sh
|
||||
Loading…
Add table
Reference in a new issue