File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- VERSION=" 1.17 "
3+ VERSION=" 1.18 "
44
55help () {
66 echo " Version v" $VERSION
@@ -33,6 +33,19 @@ create_soft_link() {
3333 done
3434}
3535
36+ create_bin_soft_link () {
37+ find -L $BUILD_PATH -maxdepth 1 -type l -delete
38+ FOLDERS=` find bin -mindepth 1 -maxdepth 1 -type d`
39+ for FOLDER in ${FOLDERS[@]}
40+ do
41+ SUBFOLDER=${FOLDER##*/ }
42+ eval " ln -s \" ` realpath --relative-to=" $BUILD_PATH " " $OSCPU_PATH /$FOLDER " ` \" \" $BUILD_PATH /${FOLDER##*/ } \" 1>/dev/null 2>&1"
43+ done
44+
45+ # create soft link ($BUILD_PATH/*.bin -> $OSCPU_PATH/$BIN_FOLDER/*.bin). Why? Because of laziness!
46+ create_soft_link $BUILD_PATH $OSCPU_PATH /$BIN_FOLDER \" * .bin\"
47+ }
48+
3649compile_dramsim3 () {
3750 if [[ ! -f $OSCPU_PATH /$DRAMSIM3_FOLDER /build/libdramsim3.a ]]; then
3851 [[ ! ` dpkg -l | grep cmake` ]] && sudo apt-get --yes install cmake
228241
229242# Simulate
230243if [[ " $SIMULATE " == " true" ]]; then
231- cd $BUILD_PATH
232-
233- # create soft link ($BUILD_PATH/*.bin -> $OSCPU_PATH/$BIN_FOLDER/*.bin). Why? Because of laziness!
234- create_soft_link $BUILD_PATH $OSCPU_PATH /$BIN_FOLDER \" * .bin\"
244+ create_bin_soft_link
235245
246+ cd $BUILD_PATH
247+
236248 # run simulation program
237249 echo " Simulating..."
238250 [[ " $GDB " == " true" ]] && gdb -s $EMU_FILE --args ./$EMU_FILE $PARAMETERS || ./$EMU_FILE $PARAMETERS
260272
261273# Run all
262274if [[ -n $TEST_CASES ]]; then
263- find -L $BUILD_PATH -maxdepth 1 -type l -delete
264- FOLDERS=` find bin -mindepth 1 -maxdepth 1 -type d`
265- for FOLDER in ${FOLDERS[@]}
266- do
267- SUBFOLDER=${FOLDER##*/ }
268- eval " ln -s \" ` realpath --relative-to=" $BUILD_PATH " " $OSCPU_PATH /$FOLDER " ` \" \" $BUILD_PATH /${FOLDER##*/ } \" 1>/dev/null 2>&1"
269- done
270-
271- create_soft_link $BUILD_PATH $OSCPU_PATH /$BIN_FOLDER \" * .bin\"
275+ create_bin_soft_link
272276
273277 cd $BUILD_PATH
274278
You can’t perform that action at this time.
0 commit comments