More verbose rpmbuild setup script
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 18 Jul 2011 11:42:53 +0000 (13:42 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 18 Jul 2011 11:42:53 +0000 (13:42 +0200)
id-rpm-build/id-setup-rpmbuild.sh

index 52376a2..0cba257 100755 (executable)
@@ -4,12 +4,15 @@
 cd $HOME
 if test -f .rpmmacros; then
        echo ".rpmmacros already exist"
-       exit 1
+else
+       echo "creating .rpmmacros"
+       echo "%_topdir $HOME/rpmbuild" >.rpmmacros
+fi
+if test ! -d rpmbuild; then
+       mkdir -p rpmbuild/BUILD
+       mkdir -p rpmbuild/RPMS/noarch
+       mkdir -p rpmbuild/RPMS/x86_64
+       mkdir -p rpmbuild/SOURCES
+       mkdir -p rpmbuild/SPECS
+       mkdir -p rpmbuild/SRPMS
 fi
-echo "%_topdir $HOME/rpmbuild" >.rpmmacros
-mkdir -p rpmbuild/BUILD
-mkdir -p rpmbuild/RPMS/noarch
-mkdir -p rpmbuild/RPMS/x86_64
-mkdir -p rpmbuild/SOURCES
-mkdir -p rpmbuild/SPECS
-mkdir -p rpmbuild/SRPMS