
# This bash shell pseudoscript opens a new development source tree.

if   [[ $MAINTENV != derivations ]] ; then
  echo 1>&2 "Please run helper/maintenv first."
  false
elif [[ ! $PWD -ef $E/$P-$V.$D1  ]] ; then
  echo 1>&2 "Please run from the top source directory $E/$D1."
  false
elif [[ -e $P-$V.$D2             ]] ; then
  echo 1>&2 "Sorry, but $P-$V.$D2 already exists."
  false
else
  # Open a full new upstream tree.
  cd ..
  cp -a $P-$V.{$D1,$D2}
  cd $P-$V.$D2
  bash - helper/letexec
  helper/extend-changelog
  helper/update-date -c $D2
fi

