Changeset 43e7d103 in rtems for scripts/mkbspspec.in
- Timestamp:
- 10/21/99 15:59:54 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 39537657
- Parents:
- 8f2cf931
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/mkbspspec.in
r8f2cf931 r43e7d103 2 2 # 3 3 4 RTEMS_DIR=`dirname $0` 5 RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \ 6 sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` 4 RTEMS_DIR=`dirname $0`/@top_srcdir@ 5 RTEMS_VERSION=@RTEMS_VERSION@ 7 6 8 bsp=$1 9 target_alias=$2 10 release=0 7 CFG=setup.cache 8 dst=@RPM_SPECSdir@ 11 9 12 # Some linux distributions use /usr/src/packages 13 # redhat uses /usr/src/redhat 14 # others might use /usr/src 15 if test -d /usr/src/packages/SPECS; 10 usage() 11 { 12 echo "$0 [options] <target_alias> <bsp>" 13 echo " options:" 14 echo " -cfg <setup.cache>" 15 echo " -o <rpm-spec-dir>" 16 exit 1 ; 17 } 18 19 while test $# -ge 3; do 20 case $1 in 21 -cfg) 22 shift 23 CFG=$1 24 shift 25 ;; 26 -o) 27 shift 28 dst=$1 29 shift 30 ;; 31 -*) 32 echo "invalid option $1"; 33 usage 34 ;; 35 esac 36 done 37 38 if test ! $# -eq 2; 16 39 then 17 dst=/usr/src/packages/SPECS; 18 elif test -d /usr/src/redhat/SPECS; 19 then 20 dst=/usr/src/redhat/SPECS; 21 elif test -d /usr/src/SPECS/; 22 then 23 dst=/usr/src/SPECS; 40 echo "Invalid number of arguments" 41 usage 24 42 fi 43 44 # target to build for 45 target_alias=$1 46 bsp=$2 47 48 . ./$CFG 49 50 specfile=${dst}/$target_alias-$bsp-$RTEMS_VERSION.spec 25 51 26 52 sed -e "s%@Version@%${RTEMS_VERSION}%g" \ 27 53 -e "s%@bsp@%${bsp}%g" \ 28 -e "s%@Release@%${r elease}%g" \54 -e "s%@Release@%${rtems_release}%g" \ 29 55 -e "s%@target_alias@%${target_alias}%g" \ 30 < ${RTEMS_DIR}/rtems.spec.in \ 31 > ${dst}/rtems-$target_alias-$bsp.spec 56 < ${RTEMS_DIR}/rtems/rtems.spec.in \ 57 > ${specfile} 58 59 echo Generated ${specfile}
Note: See TracChangeset
for help on using the changeset viewer.