Skip to content
Permalink
Browse files

Climb up to project root dynamically.

This fixes the "wrong number of .."-problem once and for all.

Change-Id: I84d2bd0835c78844e404596fef7839282e370a42
  • Loading branch information
svenpanne committed Dec 19, 2019
1 parent fc76311 commit b43f57bcf9a192b4e7f681efb24e503ca191a7fe
2 .f12
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat .site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../../../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

@@ -1,7 +1,7 @@
#!/bin/bash
set -e

SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(until [ $PWD == / ]; do if [ -e .site ]; then cat .site; break; else cd ..; fi; done)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE

0 comments on commit b43f57b

Please sign in to comment.
You can’t perform that action at this time.