3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # This will reorder icon-themes/*/links.txt to the right order
12 for I
in icon-themes
/*/links.txt
; do
14 cat "$I" |
while read LINK ORIG
16 if [ -f "$D/$LINK" -a -f "$D/$ORIG" ] ; then
17 if diff "$D/$LINK" "$D/$ORIG" >/dev
/null
2>&1 ; then
18 echo "$I: removing $LINK from git: both $LINK and $ORIG are the same files" 1>&2
19 git
rm "$D/$LINK" 1>/dev
/null
22 echo "$I: link and orig differs, check the images, and remove manually: $LINK $ORIG" 1>&2
25 elif [ -f "$D/$LINK" ] ; then
26 echo "$I: swapping to right order: $ORIG $LINK" 1>&2
28 elif [ -n "$LINK" -a "${LINK:0:1}" != "#" -a ! -f "$D/$LINK" -a ! -f "$D/$ORIG" ] ; then
29 echo "$I: neither exists, removing the line: $LINK $ORIG" 1>&2
38 # vim: set expandtab sw=4 ts=4: