Browse Source

made wrapper for esh

feature/startup-from-labels
Mario Alegre 4 years ago
parent
commit
df74077eb6
  1. 3
      debian/Containerfile
  2. 20
      debian/assets/bin/esh

3
debian/Containerfile

@ -38,4 +38,5 @@ COPY assets/bin/ /usr/local/bin/
# Install templating engine
RUN wget https://raw.githubusercontent.com/jirutka/esh/master/esh && \
chmod +x esh && \
mv esh /usr/local/bin/
mkdir -p /usr/local/lib/esh && \
mv esh /usr/local/lib/esh

20
debian/assets/bin/esh

@ -0,0 +1,20 @@
#!/bin/bash
esh=/usr/local/lib/esh/esh
if [[ $# -gt 2 ]]; then
$esh "$@"
else
if [[ $# -eq 2 ]]; then
out="$2"
elif [[ $1 == *.esh ]]; then
out="${1%.esh}"
else
out='-'
fi
fi
$esh -o "$out" "$1"
chmod $(stat -c '%a' "$1") "$out"
chown $(stat -c '%U:%G' "$1") "$out"
Loading…
Cancel
Save