mirror of
https://github.com/darlinghq/darling-openssl.git
synced 2024-11-23 11:19:50 +00:00
29 lines
874 B
Bash
Executable File
29 lines
874 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script makes sure there are no local source diffs not accounted for by a patch file in the patches directory.
|
|
|
|
if [ "$1" == "clean" ]; then
|
|
# nothing to do
|
|
exit 0
|
|
fi
|
|
|
|
SCRIPTDIR=$( dirname "$0" )
|
|
"$SCRIPTDIR"/generate-patch.sh /tmp/$$.unaccounted.patch
|
|
|
|
if [ -e "/tmp/$$.unaccounted.patch" ]; then
|
|
echo "/tmp/$$.unaccounted.patch:0: error: local unaccounted source diffs"
|
|
if [ "$RC_XBS" != "" ]; then
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
PLISTVER=$( /usr/libexec/PlistBuddy -c 'Print :OpenSourceVersion' "$SCRIPTDIR"/../OpenSSL098.plist )
|
|
SRCVER=$( cat "$SCRIPTDIR"/../src/.version )
|
|
|
|
if [ "$PLISTVER" != "$SRCVER" ]; then
|
|
LINENUM=$( grep -n OpenSourceVersion "$SCRIPTDIR/../OpenSSL098.plist" | awk -F: '{print $1}' )
|
|
echo "$SCRIPTDIR/../OpenSSL098.plist:$LINENUM: error: OpenSourceVersion is wrong"
|
|
if [ "$RC_XBS" != "" ]; then
|
|
exit 1
|
|
fi
|
|
fi |