-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.bash
More file actions
36 lines (32 loc) · 714 Bytes
/
package.bash
File metadata and controls
36 lines (32 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/bash -x
find='C:\Program Files\Git\usr\bin\find.exe'
TARGET_DIR="generatedLib"
mkdir $TARGET_DIR
PREFIX="$1"
HEAP_FILE=heap_2.c
DIRLIST="
.
FreeRTOS
FreeRTOS/Source
FreeRTOS/Source/include
FreeRTOS/Source/portable
FreeRTOS/Source/portable/Common
FreeRTOS/Source/portable/MemMang
FreeRTOS/Source/portable/GCC/ARM_CM3"
for f in $DIRLIST
do
"$find" "$PREFIX/$f" -maxdepth 1 -type f -print | while IFS= read -r file; do
target="${file%/*}"
target="$TARGET_DIR/${target#"$PREFIX/"}"
mkdir -p "$target" && cp $file "$target"
done
done
# select memory policy
cd $TARGET_DIR/FreeRTOS/Source/portable/MemMang
for f in `ls *.c`
do
if [ $f != $HEAP_FILE ]
then
mv $f "$f.off"
fi
done