makerelease 790 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. last=`cat etc/version`
  3. lmajor=`echo $last | sed 's:\..*::'`
  4. lminor=`echo $last | sed 's:[0-9][0-9]*\.::;s:p[0-9][0-9]*-.*$::'`
  5. lpatch=`echo $last | sed 's:.*p::;s:-.*$::'`
  6. lrelease=`echo $last | sed 's:.*-::'`
  7. lpatch=`expr $lpatch + 1`
  8. echo "Previous Release: $last"
  9. echo ""
  10. while [ 1 ]; do
  11. echo -n "New Release [$lmajor.${lminor}p$lpatch-$lrelease] "
  12. read next
  13. if [ -z "$next" ]; then
  14. next="$lmajor.${lminor}p$lpatch-$lrelease"
  15. break
  16. else
  17. echo "Use '$next' as the next release? [yes] "
  18. read yesno
  19. if [ -z "$yesno" -o "$yesno" = "y" -o "$yesno" = "yes" ]; then
  20. break
  21. fi
  22. fi
  23. done
  24. rel="Genesis-$next"
  25. echo $next > etc/version
  26. cd ..
  27. mv $lrelease $rel
  28. tar -cf "${rel}.tar" $rel
  29. gzip -9 "${rel}.tar"