apiVersion: v1
data:
  clientgitinit.bash: "#!/bin/sh\n\ngit config --global user.email yuuvis-init@yuuvis.org\ngit
    config --global user.name yuuvis-init\n\necho 'git clone'\n\nif git clone {{.Values.yuuvis.git.protocol}}://{{.Values.yuuvis.git.user}}:{{.Values.yuuvis.git.password}}@{{.Values.yuuvis.git.url}}
    --branch {{.Values.yuuvis.git.branch}}; then\n  echo \"git branch {{.Values.yuuvis.git.branch}}
    exists\"\n  cd {{.Values.yuuvis.git.name}}\n  if [ ! -f apps/client/system/schema.xml ];
    then\n    mkdir -p apps/client/system/\n  fi\n  if [ ! -f apps/clientsystem/system/schema.xml ];
    then\n    mkdir -p apps/clientsystem/system/\n  fi\n  cp /yuuvis/data/schema.xml
    apps/client/system/schema.xml\n  cp /yuuvis/data/clientsystem_schema.xml apps/clientsystem/system/schema.xml\n
    \ if [ ! -f apps/api-web/text/i18n_de.json ]; then\n    mkdir -p apps/api-web/text/\n\tcp
    /yuuvis/data/i18n_de.json apps/api-web/text/i18n_de.json\n\tcp /yuuvis/data/i18n_en.json
    apps/api-web/text/i18n_en.json\n  else\n    jq -s '.[0] * .[1]' apps/api-web/text/i18n_de.json
    /yuuvis/data/i18n_de.json > merge_i18n_de.json\n\tjq -s '.[0] * .[1]' apps/api-web/text/i18n_en.json
    /yuuvis/data/i18n_en.json > merge_i18n_en.json\n\trm apps/api-web/text/i18n_de.json\n\trm
    apps/api-web/text/i18n_en.json\n\tmv merge_i18n_de.json apps/api-web/text/i18n_de.json\n\tmv
    merge_i18n_en.json apps/api-web/text/i18n_en.json\n  fi\n\tjq -s '.[0] * .[1]'
    system/systemHookConfiguration.json /yuuvis/data/systemHookConfiguration.json
    > merge_hook.json\n\trm system/systemHookConfiguration.json\n\tmv merge_hook.json
    system/systemHookConfiguration.json\n\tgit add .\n\tgit commit -m \"init api-web
    config\"\n\techo 'git push'\n    git push origin {{.Values.yuuvis.git.branch}}\n
       exit 0 \n  fi\nfi  \necho 'git and/or git branch not found'\nexit 1"
kind: ConfigMap
metadata:
  name: clientinit
