Make executable scripts executable

Bruce Korb bkorb@sco.COM
Wed Mar 29 07:56:00 GMT 2000


Sometimes, when people download the CVS sources,
they wind un with shell scripts that are not executable.
This would add "chmod a+x" functionality to the touch
function.  OK to apply?

$ diff -c contrib/gcc_update contrib/gcc_update.new
*** contrib/gcc_update  Sat Nov 27 23:41:09 1999
--- contrib/gcc_update.new      Wed Mar 29 07:45:36 2000
***************
*** 90,95 ****
--- 90,102 ----
  EOF
  }

+ executable_scripts () {
+ cat <<EOF
+ gcc/fixinc/genshell
+ gcc/fixinc/*.sh
+ gcc/fixinc/fixinc.*
+ EOF
+ }

  # This function checks whether its first argument is newer than all
  # the other arguments.  It returns success (0) otherwise.
***************
*** 112,117 ****
--- 119,128 ----
                touch $f
            fi
        fi
+     done
+
+     executable_scripts | while read f ; do
+       chmod a+x $f
      done
  }


More information about the Gcc-patches mailing list