URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [config/] [mpw/] [MoveIfChange] - Diff between revs 578 and 1765
Only display areas with differences |
Details |
Blame |
View Log
Rev 578 |
Rev 1765 |
# Rename a file only if it is different from a previously existing
|
# Rename a file only if it is different from a previously existing
|
# file of the same name. This is useful for keeping make from doing
|
# file of the same name. This is useful for keeping make from doing
|
# too much work if the contents of a file haven't changed.
|
# too much work if the contents of a file haven't changed.
|
|
|
# This is an MPW translation of the standard GNU sh script move-if-change.
|
# This is an MPW translation of the standard GNU sh script move-if-change.
|
|
|
Set exit 0
|
Set exit 0
|
|
|
If "`exists -f "{2}"`"
|
If "`exists -f "{2}"`"
|
Compare "{1}" "{2}" >dev:null
|
Compare "{1}" "{2}" >dev:null
|
If {status} != 0
|
If {status} != 0
|
Rename -y "{1}" "{2}"
|
Rename -y "{1}" "{2}"
|
Else
|
Else
|
Echo "{2}" is unchanged
|
Echo "{2}" is unchanged
|
Delete -i -y "{1}"
|
Delete -i -y "{1}"
|
End
|
End
|
Else
|
Else
|
Rename -y "{1}" "{2}"
|
Rename -y "{1}" "{2}"
|
End
|
End
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.