save.sh 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #! /bin/bash
  2. arch=$1
  3. echo $arch
  4. shift
  5. echo $*
  6. dest=${r38_archive:-acn1@codemist.dyndns.org:/d/r38}
  7. echo "Save executables to $dest [use r38_archive to override]"
  8. ssh ${dest%%:*} mkdir -p ${dest#*:}/objects/$arch
  9. ssh ${dest%%:*} mkdir -p ${dest#*:}/exe/$arch
  10. ssh ${dest%%:*} mkdir -p ${dest#*:}/images/$arch
  11. echo About to copy objs.tar.gz
  12. scp objs.tar.gz $dest/objects/$arch
  13. for f in $*
  14. do
  15. echo About to copy $f
  16. scp $f $dest/exe/$arch/$f
  17. done
  18. echo About to copy r38.img
  19. scp r38.img $dest/images/$arch/r38.img
  20. case $arch in
  21. *demo)
  22. ;;
  23. *)
  24. echo ABout to copy csl.img
  25. scp csl.img $dest/images/$arch/r38.img
  26. ;;
  27. esac
  28. echo Files copies to master site
  29. exit
  30. # NB you can set a shell variable r38_archive to give the location
  31. # where files should be saved. It will need to have subdirectories
  32. # exe, images and objects ready in it, and is given in a form like
  33. # acn1@codemist.dyndns.org:/d/r38
  34. # (that is the default location used)
  35. which=`pwd`
  36. echo $which
  37. which=${which##*/}
  38. echo $which
  39. which=${which#local-}
  40. echo $which
  41. which=${which#demo-}
  42. echo which=$which
  43. case $which in
  44. # I save everything if I am on win32 or linux64. In particular these are the
  45. # p[latforms on which I build and save image files and where I dare to save
  46. # ready-built executables.
  47. win32 | suse-64)
  48. echo save for win32 or linux64
  49. ../util/save-exe.sh
  50. ../util/save-image.sh
  51. ../util/save-objs.sh
  52. ;;
  53. # On a Macintosh I will save a ready-linked executable in the hope that it is
  54. # a single platform so there is hope that that will make sense. Actually I
  55. # am certain it will not in that Intel and ppc-mac platforms will not agree -
  56. # unless I arrange to create fat binaries. At present I support just ppc-mac.
  57. mac-darwin | win64)
  58. echo save for mac-darwin ow win64
  59. ../util/save-exe.sh
  60. ../util/save-objs.sh
  61. ;;
  62. # In all other cases (mostly just loads of variants on Linux and Unix) I will
  63. # save object files (only) since those are needed because of the LGPL.
  64. *)
  65. echo "save in generic case (${which})"
  66. ../util/save-objs.sh
  67. ;;
  68. esac