# We need to use --global for the NAME and USER vars as we're
# assuming this script can be run from anywhere (ie, not in an
# already existing git repo)
-DATE=`date | cut -f1,2,3,6 -d" "`
+DATE=`date +"%a %b %d %Y"`
NAME=`git config --get-all user.name`
EMAIL=`git config --get-all user.email`
STAP_MAJOR_VERSION=`grep "^Version:" systemtap.spec`
cd ../systemtap
sed -i "s/Release: .*/Release: $GIT_VERSION_TAG\%\{\?dist\}/" systemtap.spec
-sed -i "s/\^Source:.*/Source: %{name}-%{version}-$GIT_VERSION_TAG.tar.gz/" systemtap.spec
+sed -i "s/^Source:.*/Source: %{name}-%{version}-$GIT_VERSION_TAG.tar.gz/" systemtap.spec
sed -i "s/\%changelog/\%changelog\n* $DATE $NAME <$EMAIL> - $CHANGELOG_VERSION-$GIT_VERSION_TAG\n- Automated weekly rawhide release\n/" systemtap.spec
echo "Please ensure that you have an up to date fedoraproject SSL certificate, you can achieve this by running fedora-cert -n"