#!/bin/bash set -e function perms-react { [[ -z $1 ]] && echo function perms-react needs vhost as argument && exit 1 vhost=$1 echo $vhost/ mkdir -p $vhost/build/ chown -R runner. $vhost/ unset vhost } # define your vhost folder here perms-react-js validate-react echo all done