| 1 |
#!/bin/ksh |
| 2 |
# |
| 3 |
# $Id: replacer 1023 2007-02-04 09:20:41Z comand $ |
| 4 |
# |
| 5 |
# Copyright 2007 Cory Omand <comand@blastwave.org> |
| 6 |
# All rights reserved. Use is subject to license terms. |
| 7 |
# |
| 8 |
# Redistribution and/or use, with or without modification, is |
| 9 |
# permitted. This software is without warranty of any kind. The |
| 10 |
# author(s) shall not be liable in the event that use of the |
| 11 |
# software causes damage. |
| 12 |
# |
| 13 |
# restorer - restore libtool .la file backups. |
| 14 |
# |
| 15 |
|
| 16 |
function usage { |
| 17 |
print "Usage: $0 <root_path>" |
| 18 |
exit 1 |
| 19 |
} |
| 20 |
|
| 21 |
[ -z "$@" ] && usage |
| 22 |
|
| 23 |
gfind $@ -type f -name '*.la~' -print0 | \ |
| 24 |
gxargs --null --no-run-if-empty -n1 | \ |
| 25 |
while read file ; do gcp -v $file ${file%.*~}.la ; done |
| 26 |
|