+## usage: do_setupconf <civicrm-path>
+function do_setupconf() {
+ pushd "$1" >> /dev/null
+ echo "[[Initialize bin/setup.conf]]"
+ if [ ! -f "bin/setup.conf" ]; then
+ pwd
+ echo cp "bin/setup.conf.txt" "bin/setup.conf"
+ cp "bin/setup.conf.txt" "bin/setup.conf"
+ fi
+ echo "[[chmod 600 bin/setup.conf]]"
+ chmod 600 bin/setup.conf
+ echo ""
+ echo "====================[ Next steps (for Civi v4.6+) ]===================="
+ echo " * Edit the following file and fill in credentials for the CiviCRM DB."
+ echo " $1/bin/setup.conf"
+ echo " * Perform one of these steps:"
+ echo " + Run 'bin/setup.sh -Dg' to download and generate missing code."
+ echo " + Run 'bin/setup.sh' to download code and reset the CiviCRM DB"
+ echo " with the latest schema."
+ echo " * If this is a network-accessible server (eg staging/production), then"
+ echo " setup.conf may present a security issue. The permissions have been"
+ echo " preset to restrict access in most servers - but this may not work"
+ echo " in all environments. Please:"
+ echo " + Check whether the file is web-accessible."
+ echo " + Optionally, change the permissions."
+ echo " + Optionally, delete the file."
+ popd > /dev/null
+}
+