Commit c2c2c8aa authored by Maximilian Dolling's avatar Maximilian Dolling

fixed version output and put error message to the bottom

parent 6edc5c0e
......@@ -28,21 +28,28 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Version first, because it does not require any other files or settings.
if [ "$1" = "--version" ]; then
cat /version.txt
exit 0
fi
# checks if a repository was bound to the docker image
if [ ! -d /repo ]; then
echo
echo "Repository to run services on not bound! Showing help page..."
cat /usr/local/bin/entrypoint-manual.txt
echo
echo "Repository to run services on not bound! Showing help page..."
exit 1
fi
# checks if a .ci-service.yml exists
if [ ! -f /repo/.ci-services.yml ]; then
cat /usr/local/bin/entrypoint-manual.txt
echo
echo "Repository does not contain a config for the ci-services."
echo "Visit https://gitext.gfz-potsdam.de/software/services/fair/ci-services/-/blob/master/doc/doc_service_description.md#general"
echo "for more information"
cat /usr/local/bin/entrypoint-manual.txt
exit 1
fi
......@@ -128,13 +135,8 @@ if [ "$1" = "--test" ]; then
exit 0
fi
if [ "$1" = "--version" ]; then
cat /version.txt
exit 0
fi
# if no suitable argument was found, shows help page
cat /usr/local/bin/entrypoint-manual.txt
echo
echo "Unknown command line argument! Showing help page..."
cat /usr/local/bin/entrypoint-manual.txt
exit 1
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