Add copyFiles and copyDirectories for not repeating same code snippets again and again. Signed-off-by: Ozan Çağlayan <ozancag@xxxxxxxxx> --- scripts/admin-update.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index aa7cbd6..1c516e9 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -165,6 +165,24 @@ nagometer() { } +# Copy each file in $1 into $2 +copyFiles() { + FILES=$1 + TARGET=$2 + for file in $FILES; do + echo "Copying $GIT_TREE/$TARGET/$file" + cp "$GIT_TREE/$TARGET/$file" $TARGET/ + done +} + +copyDirectories() { + DIRS=$1 + for dir in $DIRS; do + echo "Copying $GIT_TREE/$dir/*.[ch]" + cp $GIT_TREE/$dir/{Kconfig,Makefile,*.[ch]} $dir/ &> /dev/null + done +} + # First check cmdline args to understand # which patches to apply and which release tag to set. # -- 1.7.11.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html