#!/bin/sh echo "*** PREPARE SRC BEGIN ***" global SRC_DIR := $[pwd] cd work echo "Preparing source files and folders. This may take a while..." # Remove old sources (if they exist) rm -rf src mkdir src # Copy all source files and folders to 'work/src'. cp ../*.sh src cp ../.config src cp ../README src cp ../*.txt src cp -r ../minimal_rootfs src cp -r ../minimal_overlay src cp -r ../minimal_config src # Delete the '.gitignore' files which we use in order to keep track of otherwise # empty folders. find * -type f -name '.gitignore' -exec rm {} + echo "Source files and folders have been prepared." cd $SRC_DIR echo "*** PREPARE SRC END ***" (CommandList children: [ (C {(echo)} {(DQ ("*** PREPARE SRC BEGIN ***"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SRC_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: spids: [12 14] ) } spids: [11] ) ] spids: [11] ) (C {(cd)} {(work)}) (C {(echo)} {(DQ ("Preparing source files and folders. This may take a while..."))}) (C {(rm)} {(-rf)} {(src)}) (C {(mkdir)} {(src)}) (C {(cp)} {(../) (Lit_Other "*") (.sh)} {(src)}) (C {(cp)} {(../.config)} {(src)}) (C {(cp)} {(../README)} {(src)}) (C {(cp)} {(../) (Lit_Other "*") (.txt)} {(src)}) (C {(cp)} {(-r)} {(../minimal_rootfs)} {(src)}) (C {(cp)} {(-r)} {(../minimal_overlay)} {(src)}) (C {(cp)} {(-r)} {(../minimal_config)} {(src)}) (C {(find)} {(Lit_Other "*")} {(-type)} {(f)} {(-name)} {(SQ <.gitignore>)} {(-exec)} {(rm)} {(Lit_LBrace "{") (Lit_RBrace "}")} {(Lit_Other "+")} ) (C {(echo)} {(DQ ("Source files and folders have been prepared."))}) (C {(cd)} {($ VSub_Name "$SRC_DIR")}) (C {(echo)} {(DQ ("*** PREPARE SRC END ***"))}) ] )