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