#!/bin/bash # This script is used to distribute the files to the target directory # Check if the target directory exists if [ ! -d $1 ]; then mkdir -p $1 else rm -rf $1/* fi rsync -av --include='*/' --include='*.c' --include='*.h' --include='Makefile' --exclude='*' src/ $1/src/ rsync -av --include='*/' --include='*.c' --include='*.h' --include='Makefile' --exclude='*' inc/ $1/inc/ rsync -av --include='*/' --include='*.c' --include='*.h' --include='Makefile' --exclude='*' lib/ $1/lib/ cp release_makefile.mk $1/Makefile make sources.mk cp sources.mk $1/sources.mk