#! /bin/sh
target="$1"
shift
find_python=`dirname "$0"`/find-python2
python=`"$find_python"`
for file; do
  basefile=`basename "$file"`
  sed -e '1s!python.*!'"$python"'!' < "$file" > "$target"/"$basefile"
  test -x "$file" && chmod +x "$target"/"$basefile"
done
