simple stupid backup tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ssbt 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. #
  3. # Copyright 2018 Bernhard Froehlich <decke@bluelife.at>
  4. # All rights reserved
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions
  8. # are met:
  9. #
  10. # 1. Redistributions of source code must retain the above copyright
  11. # notice, this list of conditions and the following disclaimer.
  12. #
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. # notice, this list of conditions and the following disclaimer in the
  15. # documentation and/or other materials provided with the distribution.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  23. # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  24. # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  25. # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  26. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  27. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. # get libs
  29. if [ -e "${0%/*}/lib" ]; then
  30. LIB="${0%/*}/lib"
  31. elif [ -e "/usr/local/lib/ssbt" ]; then
  32. LIB="/usr/local/lib/ssbt"
  33. elif [ -e "/usr/lib/ssbt" ]; then
  34. LIB="/usr/lib/ssbt"
  35. else
  36. echo "unable to locate ssbt libraries"
  37. exit 1
  38. fi
  39. # load libs
  40. . "${LIB}/core"
  41. . "${LIB}/core-manual"
  42. . "${LIB}/core-rsync"
  43. . "${LIB}/core-rsynczfs"
  44. . "${LIB}/core-sftp"
  45. . "${LIB}/cmd"
  46. . "${LIB}/config"
  47. . "${LIB}/util"
  48. . "${LIB}/base"