#!/usr/bin/env bash
if [ ! -d "$1" ] || [ ! -d "$2" ]; then
        echo "Expecting path to backend and destination directory"
        exit 1
fi

rm -rf $2 || exit 1;

rsync -avr \
        --exclude="/test" \
        --exclude="/resources/public/media" \
        --exclude="/target" \
        --exclude="/scripts" \
        --exclude="/.*" \
        $1 $2;

#!/usr/bin/env bash

if [ "$#" -ne 0 ]; then
        echo "Expecting parameters: 1=path to backend; 2=destination directory"
        exit 1
fi

rm -rf $2 || exit 1;

rsync -avr \
        --exclude="/test" \
        --exclude="/resources/public/media" \
        --exclude="/target" \
        --exclude="/scripts" \
        --exclude="/.*" \
        $1 $2;

Fix control on entry parameters
:bug: Fix control on entry parameters

Signed-off-by: mathieu.brunot <cbb78c9d6ecc8139b4697c3352cc1f1edbdf61d7@monogramm.io>
