]> git.mxchange.org Git - flightgear.git/commitdiff
fg-check:
authormfranz <mfranz>
Sat, 28 Jul 2007 17:03:10 +0000 (17:03 +0000)
committermfranz <mfranz>
Sat, 28 Jul 2007 17:03:10 +0000 (17:03 +0000)
- fix rle detection
- check all textures (to catch some forms of curruption)

fg-submit:
- documentation fixes & cleanup

scripts/tools/fg-check
scripts/tools/fg-submit

index 47798ca42a9b4f1dd1582ee693f633f5a24090c7..b78dba6e6b50afd24516bc553fb52a3fd1d07b97 100755 (executable)
@@ -7,7 +7,7 @@
 SELF=${0##*/}
 
 # optional apps
-RLE=$(which rle &>/dev/null)              # http://members.aon.at/mfranz/rle.tar.gz (depends on Qt lib)
+RLE=$(which rle 2>/dev/null)              # http://members.aon.at/mfranz/rle.tar.gz (depends on Qt lib)
 AC3D_SCAN=$(which ac3d-scan 2>/dev/null)  # http://members.aon.at/mfranz/ac3d-scan
 
 
@@ -49,20 +49,21 @@ done
 
 LOG "checking for uncompressed textures ..."
 find . -iname \*.rgb -o -iname \*.rgba|while read i; do
-       if file "$i"|grep -v RLE >/dev/null; then
-               new=$TMP/sgi.rgb
+       new=$TMP/sgi.rgb
+       if [ -x "$RLE" ]; then
+               cp "$i" $new && "$RLE" $new 2>&1|grep corrupt &>/dev/null && ERROR "\t$i ... FILE CORRUPTED"
+       else
                convert "$i" -compress RLE sgi:$new
-               [ -x "$RLE" ] && $RLE $new 2>/dev/null
-               perl -e '
-                       my $file = shift;
-                       my $old = -s $file;
-                       my $new = -s shift;
-                       if ($new < $old) {
-                               printf "\t$file:  could be %0.02f%% of current size (%d bytes less)\n",
-                                               100 * $new / $old, $old - $new;
-                       }
-               ' "$i" $new
        fi
+       perl -e '
+               my $file = shift;
+               my $old = -s $file;
+               my $new = -s shift;
+               if ($new < $old) {
+                       printf "\t$file:  could be %0.02f%% of current size (%d bytes less)\n",
+                                       100 * $new / $old, $old - $new;
+               }
+       ' "$i" $new
 done
 
 
index 02975dd0060efb310bbcc3c7028cddba602efdad..3a90c59aa2abb2aa84435a775ee495f6561ad911 100755 (executable)
 # this at the end with two arguments:
 #
 #     $1 ... archive or compressed diff for submission
-#     $2 ... accessory diff, *NOT* for submission!
+#     $2 ... accessory uncompressed diff, *NOT* for submission!
 #
 # $1 and $2 are guaranteed not to contain spaces, only $1 is guaranteed
 # to actually exist. Such a script can be used to upload the file to an
 # ftp-/webserver, and/or to remove one or both files. Example using
-# KDE's kfmclient for upload (alternatives: ncftpput, gnomevfs-copy, wput):
+# KDE's kfmclient for upload (alternatives: ncftpput, gnomevfs-copy):
 #
 #     $ cat ~/bin/fg-upload
 #     #!/bin/bash
@@ -72,9 +72,9 @@
 # A file can use a list of three keywords with arguments, each on a
 # separate line:
 #
-#     ALLOW   <pattern-list>     ... accept & report matching file
-#     DENY    <pattern-list>     ... reject & report matching file
-#     IGNORE  <pattern-list>     ... silently reject matching file
+#     ALLOW  <pattern-list>     ... accept & report matching file
+#     DENY   <pattern-list>     ... reject & report matching file
+#     IGNORE <pattern-list>     ... silently reject matching file
 #
 # A <pattern-list> is a space-separated list of shell pattern.
 # It may also be empty, in which case it has no effect. Examples:
 #
 # The list of pattern is checked in the same order in which it was
 # built. The first match causes a file to be accepted or rejected.
-# Further matches are not considered. Comments using the
-# hash character '#' are allowed and ignored.
+# Further matches are not considered. Comments using the hash
+# character '#' are allowed and ignored.
 #
 # Some default rules are always added at the end. If you want to
-# bypass them, then just add "ALLOW *" or "DENY *" at the end of
-# your configuration, and no file will ever reach the default rules.
+# bypass them, then finish your configuration with an "ALLOW *"
+# or "DENY *", and no file will ever reach the default rules.
 #
 #
 # Example:
@@ -98,7 +98,7 @@
 #     ALLOW *.xcf    # ... allow all other GIMP images (the default
 #                    # rules would otherwise throw them out)
 #
-#     ALLOW  g.old   # add this silly file, but ...
+#     ALLOW  not.old # add this file, but ...
 #     IGNORE *.old   # throw out all other "old" files (and don't
 #                    # report that to the terminal)
 #