Created
November 29, 2013 12:13
-
-
Save tlatsas/7704857 to your computer and use it in GitHub Desktop.
build each package in its own rpmbuild folder
This file contains hidden or 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
#!/bin/bash | |
if [[ -z $1 ]]; then | |
echo "usege: $0 new|link <build>"; | |
exit 1 | |
fi | |
if [[ -z $2 ]]; then | |
echo "build name required" | |
exit 2 | |
fi | |
if [[ "$1" == "new" ]] | |
then | |
echo "Creating rpmbuild tree under: ~/rpmbuild-$2" | |
mkdir -p ~/rpmbuild-$2/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | |
ln -nsf ~/rpmbuild-$2 ~/rpmbuild | |
elif [[ "$1" == "link" ]] | |
then | |
echo "Linking rpmbuild tree: ~/rpmbuild-$2" | |
ln -nsf ~/rpmbuild-$2 ~/rpmbuild | |
else | |
echo "unkown command $1" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment