diff options
Diffstat (limited to 'bsp/update-targets.sh')
-rwxr-xr-x | bsp/update-targets.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh index e3b2496..198cd5a 100755 --- a/bsp/update-targets.sh +++ b/bsp/update-targets.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/bash help() { cat >&2 <<EOF @@ -45,9 +45,10 @@ then TARGET_LIST="$(ls -d coreip*) " TARGET_LIST+="sifive-hifive1 sifive-hifive1-revb freedom-e310-arty sifive-hifive-unleashed " else - if [ ! -f "$DTSFILE" -a "$DTSFILE" != "*.dts" ] + file "$DTSFILE" + if [ ! -f "$DTSFILE" ] then - echo "[ERROR] $0: $DTSFILE must be a dts file" >&2 + echo "[ERROR] $0: $DTSFILE must be a file" >&2 help "$0" exit 1 fi @@ -70,7 +71,7 @@ else echo "[INFO] $0: "$CUSTOM_TARGET" not found! Creating one" >&2 mkdir -p $CUSTOM_TARGET fi - cp $DTSFILE $CUSTOM_TARGET + cp $DTSFILE "$CUSTOM_TARGET/design.dts" TARGET_LIST="$CUSTOM_TARGET " fi |