#! /bin/bash if ! test -f ./publish.config.user ; then echo "scpTargetFolder=user@host.com:/path/to/folder/" > ./publish.config.user echo "Missing config file 'publish.config.user' created." else webpack --mode production --devtool false npm run build-elm # executes all variable definitions in the config file: . publish.config.user scp -r public/* $scpTargetFolder fi