Changeset 4c719e6 in freewrt for scripts


Ignore:
Timestamp:
Jun 18, 2006, 11:34:22 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
4c2c169
Parents:
3c1c522
Message:

oops, *-i* matches bfd-in3.h too

git-svn-id: svn://www.freewrt.org/trunk/freewrt@125 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/sed.bsd

    r3c1c522 r4c719e6  
    3535shopt -s extglob
    3636
    37 if [[ "$*" != *@(-i)* ]]; then
     37fn=
     38args=
     39sp=
     40inplace=0
     41for p in "$@"; do
     42        if [[ $p = @(-i) ]]; then
     43                inplace=1
     44        else
     45                args="$args$sp'$p'"
     46                sp=" "
     47        fi
     48        fn=$p
     49done
     50
     51if [[ $inplace = 0 ]]; then
    3852        exec /usr/bin/sed "$@"
    3953fi
     
    4458fi
    4559
    46 fn=
    47 args=
    48 sp=
    49 for p in "$@"; do
    50         if [[ $p != @(-i) ]]; then
    51                 args="$args$sp'$p'"
    52                 sp=" "
    53         fi
    54         fn=$p
    55 done
    56 
    5760eval /usr/bin/sed $args >$T
    5861rv=$?
Note: See TracChangeset for help on using the changeset viewer.