WIP: Use package namespaces as directory names

tail -n +2 Packages.csv |
egrep '^[^,]+' |
while IFS=, read name dir prefix _; do
  if test "$dir" != "$prefix"; then
    mv "Packages/$dir" "Packages/$prefix"
  fi
done

Change-Id: I380b6e48a98dec3931defb4e363d97f68a49790c
WIP: rm Packages/*/Patches/README.rst

Change-Id: Ic33e3c38ac4804512324670149e05774ef1f5227
WIP: Organize package releases and patches by version

for p in Packages/*/Patches/*' '*; do
  name="${p##*/}"
  ns="${name% *}"
  ver="${name#* }"
  echo "$name $ns $ver"
  mkdir -p "Packages/$ns/$ver"
  mv "Packages/$ns/Patches/$ns $ver" "Packages/$ns/$ver/0"
done

for p in Packages/*/Patches/*'_'*'_'*; do
  name="${p##*/}"
  ns_ver="${name%_*}"
  ns="${ns_ver%_*}"
  ver="${ns_ver#*_}"
  num="${name##*_}"
  echo "$name $ns $ver $num"
  mkdir -p "Packages/$ns/$ver"
  mv "Packages/$ns/Patches/${ns}_${ver}_${num}" "Packages/$ns/$ver/$num"
done

Change-Id: Id1db219395d4604a83daa8175720ec168e7e1f2e
WIP: Update README.rst for new package layout

TODO: Remove Directory column from Packages.csv?
TODO: Update Scripts/* and other files to know about this.

Change-Id: I47e8bd0bdff626bfc4bf7a50a165ef641d48faa5
WIP: Add package README.rst Layout section generator

Add Scripts/Package-README-Layout.bash to ...

Change-Id: I53c24336b8555913a6966b9167280d593933a4cb
WIP: s/Patches/Layout/

for readme in Packages/*/README.rst ; do
  layout="$(echo "$layout" | tr $'\n' $'\r')"
  tr $'\n' $'\r' <"$readme" |
  sed -r '
s|'$'-------\rPatches.*for each patch.\r''|------\rLayout\r------\r|
s|<Patches/([A-Z]+)_([0-9.]+)_([0-9]+)>|<\2/\3>|
' |
  tr $'\r' $'\n' >"$readme.tmp" &&
  mv "$readme.tmp" "$readme"
done

Change-Id: I67fbaaa5ea2cfd48de3424da25a994bcf90aa289
WIP: Update package README.rst Layout sections

Run Scripts/Package-README-Layout.bash

Change-Id: Ic5634dbbccbfec27342e601fa5d65699b9c903d7