BlueGit

timfa frameworkv3

Files

frameworkv3 / framework / build.sh

build.sh

fix relative path
timfa Tim · pushed by timfa · 2 years ago
49cf1a6d History
build.sh 570 B Download Raw
1BUILD_FILE="../js/framework.js"
2SRC_DIR="../framework"
3
4printf "Build started, output file: $BUILD_FILE\n"
5unlink $BUILD_FILE
6
7loop() {
8 shopt -s nullglob
9 shopt -s globstar
10
11 for file in "$@"/**
12 do
13 if [[ -f "$file" && "${file##*.}" = "js" ]]
14 then
15 printf "\n/*\n * Start File:\n * "$file"\n */ \n" >> "$BUILD_FILE";
16 printf "Building "$file"\n";
17 cat "$file" >> "$BUILD_FILE";
18 printf "\n/*\n * End File:\n * "$file"\n */ \n" >> "$BUILD_FILE";
19 fi
20 done
21}
22loop $SRC_DIR
23printf "DONE"