rpm-build/rpminit

24 lines
393 B
Plaintext
Raw Normal View History

2002-12-30 02:28:33 +03:00
#!/bin/sh -e
# $Id$
RPMMACROS=~/.rpmmacros
if [ -e "$RPMMACROS" ]; then
RPMDIR=`rpm --eval %_topdir`
RPMTMP=`rpm --eval %_tmppath`
else
RPMDIR=~/RPM
RPMTMP="$RPMDIR/tmp"
fi
mkdir -pv "$RPMDIR"/{BUILD,SOURCES,SPECS,SRPMS,RPMS/noarch} "$RPMTMP"
if [ ! -e "$RPMMACROS" ]; then
cat >"$RPMMACROS" <<EOF
%_topdir $RPMDIR
%_tmppath $RPMTMP
EOF
echo "Wrote $RPMMACROS:"
cat "$RPMMACROS"
fi