Created
February 22, 2018 11:17
-
-
Save laapsaap/ff64a79a1f3c10dc06a7d2c54027dbf9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### RPM.CONFIG | |
### | |
if [ -f "RPM.CONFIG" ]; then | |
echo | |
echo ":::::" | |
echo "::::: Found RPM.CONFIG, downloading files" | |
echo ":::::" | |
echo | |
. RPM.CONFIG | |
MATCH=$(curl -s "$SEARCH_URL" | grep -m 1 -o "$REGEX" | head -n 1) | |
echo | |
echo ":::::" | |
echo "::::: Found SRPM: $MATCH" | |
echo "::::: Download URL: $DOWNLOAD_URL$MATCH" | |
echo ":::::" | |
echo | |
curl -o "$MATCH" "$DOWNLOAD_URL$MATCH" | |
rpm2cpio "$MATCH" | cpio -imv --no-absolute-filenames | |
spec_file=$(ls *.spec) | |
echo | |
echo ":::::" | |
echo "::::: Found SPEC file: $spec_file" | |
echo ":::::" | |
echo | |
else | |
spec_file=$(ls *.spec) | |
echo | |
echo ":::::" | |
echo "::::: Found SPEC file: $spec_file" | |
echo ":::::" | |
echo | |
fi | |
if [ -f "RPM.SH" ]; then | |
echo | |
echo ":::::" | |
echo "::::: Found RPM.SH, executing custom code" | |
echo ":::::" | |
echo | |
/bin/bash ./RPM.SH | |
fi | |
# fix spec file | |
sed -i -e '/NoSource: 0/d' $spec_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment