Commit d56231ad authored by Kristina Hoeppner's avatar Kristina Hoeppner

Correct the URL for reporting errors

parent 535cd567
......@@ -7,21 +7,21 @@ normal=`tput sgr0`
# Get the user input
case "$1" in
configure)
db_get maharadocs/installdir
DIRNAME=$RET
db_get maharadocs/giturl
GITURL=$RET
db_get maharadocs/logdir
LOGDIR=$RET
db_get maharadocs/overwrite
OVERWRITEDIR=$RET
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
configure)
db_get maharadocs/installdir
DIRNAME=$RET
db_get maharadocs/giturl
GITURL=$RET
db_get maharadocs/logdir
LOGDIR=$RET
db_get maharadocs/overwrite
OVERWRITEDIR=$RET
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
......@@ -29,29 +29,29 @@ esac
# but better than no check :D
if [ -d $DIRNAME ]
then
if grep -Fxq $GITURL $DIRNAME/.git/config
then
# If we have what appears to be the correct git contents,
# just quit the script cleanly and let the rest of the
# packaging do its thing.
echo "Data already exists pulling from the correct source."
echo "Not doing any alteration of $DIRNAME."
exit
else
# However if it looks wrong, check if its a-ok to overwrite
if [ "$OVERWRITEDIR" == "ok" ]
then
# Buhbye!
rm -rf $DIRNAME
else
# Throw an error stating that we don't feel right about
# nuking the data we can see.
echo "${bold}The directory '$DIRNAME' already exists."
echo "We were not told to overwrite, so we will not."
echo "Exiting now. Retry with the overwrite option.${normal}"
exit
fi
fi
if grep -Fxq $GITURL $DIRNAME/.git/config
then
# If we have what appears to be the correct git contents,
# just quit the script cleanly and let the rest of the
# packaging do its thing.
echo "Data already exists pulling from the correct source."
echo "Not doing any alteration of $DIRNAME."
exit
else
# However if it looks wrong, check if its a-ok to overwrite
if [ "$OVERWRITEDIR" == "ok" ]
then
# Buhbye!
rm -rf $DIRNAME
else
# Throw an error stating that we don't feel right about
# nuking the data we can see.
echo "${bold}The directory '$DIRNAME' already exists."
echo "We were not told to overwrite, so we will not."
echo "Exiting now. Retry with the overwrite option.${normal}"
exit
fi
fi
fi
# Make our lovely new install from the git address.
......@@ -65,19 +65,19 @@ git clone $GITURL $DIRNAME
# Did we succeed?
if [ -d $DIRNAME ]
then
# Yay!
echo "Manual successfully downloaded into '$DIRNAME'."
# Yay!
echo "Manual successfully downloaded into '$DIRNAME'."
else
# In theory, we should not be here. Throw an error if we did, guessing what might
# have happened. Git _should_ have reported all failures to download, but if the
# directory is missing, then _something_ went wrong.
echo "${bold}The installation failed; the manual directory could not be found.${normal}"
echo "Please check that:"
echo "* The directory is indeed missing. If not, it is a packaging error."
echo "* $GITURL is accessible and downloadable on your network. Find a friendly sysadmin."
echo "If this appears to be a packaging error, report it to rt@catalyst.net.nz with all"
echo "the text output since you tried to install this. "
exit -1
# In theory, we should not be here. Throw an error if we did, guessing what might
# have happened. Git _should_ have reported all failures to download, but if the
# directory is missing, then _something_ went wrong.
echo "${bold}The installation failed; the manual directory could not be found.${normal}"
echo "Please check that:"
echo "* The directory is indeed missing. If not, it is a packaging error."
echo "* $GITURL is accessible and downloadable on your network. Find a friendly sysadmin."
echo "If this appears to be a packaging error, report it to info@mahara.org with all"
echo "the text output since you tried to install this. "
exit -1
fi
# Make the sitelogs directory...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment