Changeset 4618998 in mainline


Ignore:
Timestamp:
2018-04-04T17:22:15Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2f1c88e
Parents:
5754c31e
Message:

Fix tools/srepl to work in non-bash shells.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/srepl

    r5754c31e r4618998  
    11#!/bin/sh
    22
    3 function usage {
     3usage()
     4{
    45        echo "Usage:"
    56        echo
     
    1415
    1516
    16 if [ "$1" == "--" ]; then
     17if [ "$1" = "--" ]; then
    1718        usage
    18 elif [ "$#" -eq 1 ]  || [ "$2" == "--" ]; then
     19elif [ "$#" -eq 1 ]  || [ "$2" = "--" ]; then
    1920        pattern="$1"
    2021        shift
    2122        git grep -I -n "$pattern" "$@"
    22 elif [ "$#" -eq 2 ] || [ "$3" == "--" ]; then
     23elif [ "$#" -eq 2 ] || [ "$3" = "--" ]; then
    2324
    2425        if ( git status --porcelain | grep '^.[^ ]' ); then
Note: See TracChangeset for help on using the changeset viewer.