.f0rge/ci/steps/10_install.sh 1.3 KiB 39 lines Raw
1 #!/bin/sh2 # 10_install: the same install script stages both binaries from a checkout and3 # from a release directory. DESTDIR keeps the check from touching /usr/local or4 # creating the system account.5 set -eu6 7 root=$(cd "$(dirname "$0")/../../.." && pwd)8 work=$(mktemp -d)9 trap 'rm -rf "$work"' EXIT INT TERM10 11 DESTDIR=$work/checkout "$root/install.sh" >/dev/null12 DESTDIR=$work/release "$root/releases/build/0.0.0-ci/install.sh" >/dev/null13 14 for layout in checkout release; do15     for binary in inf3r-web inf3r inf3r-probe; do16         path=$work/$layout/usr/local/bin/$binary17         [ -x "$path" ] || {18             echo "10_install: $layout did not install $binary" >&219             exit 120         }21     done22     [ -f "$work/$layout/etc/systemd/system/inf3r-web.service" ] || {23         echo "10_install: $layout did not install the unit" >&224         exit 125     }26     [ -f "$work/$layout/usr/share/licenses/inf3r/LICENSE" ] || {27         echo "10_install: $layout did not install the licence" >&228         exit 129     }30 done31 32 for binary in inf3r-web inf3r inf3r-probe; do33     cmp "$work/checkout/usr/local/bin/$binary" "$work/release/usr/local/bin/$binary" || {34         echo "10_install: the two layouts installed different $binary" >&235         exit 136     }37 done38 39 echo "10_install: checkout and release layouts ok"