Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

37 rader
1.1 KiB

  1. #!/usr/bin/env bash
  2. # Exit the script if any of the commands fail
  3. set -e
  4. set -u
  5. set -o pipefail
  6. # Set working directory to the location of this script
  7. cd "$(dirname "${BASH_SOURCE[0]}")"
  8. STARTDIR="$(pwd)"
  9. DESTDIR="$STARTDIR/pkg"
  10. OUTDIR="$STARTDIR/deb"
  11. # Remove potential leftovers from a previous build
  12. rm -rf "$DESTDIR" "$OUTDIR"
  13. ## log2ram
  14. # Create directory
  15. install -Dm 644 "$STARTDIR/log2ram.service" "$DESTDIR/etc/systemd/system/log2ram.service"
  16. install -Dm 755 "$STARTDIR/log2ram" "$DESTDIR/usr/local/bin/log2ram"
  17. install -Dm 644 "$STARTDIR/log2ram.conf" "$DESTDIR/etc/log2ram.conf"
  18. install -Dm 644 "$STARTDIR/uninstall.sh" "$DESTDIR/usr/local/bin/uninstall-log2ram.sh"
  19. # cron
  20. install -Dm 755 "$STARTDIR/log2ram.cron" "$DESTDIR/etc/cron.daily/log2ram"
  21. install -Dm 644 "$STARTDIR/log2ram.logrotate" "$DESTDIR/etc/logrotate.d/log2ram"
  22. # Build .deb
  23. mkdir "$DESTDIR/DEBIAN" "$OUTDIR"
  24. cp "$STARTDIR/debian/"* "$DESTDIR/DEBIAN/"
  25. dpkg-deb --build "$DESTDIR" "$OUTDIR"
  26. reprepro -b /var/www/repos/apt/debian includedeb buster "$OUTDIR"/*.deb
  27. reprepro -b /var/www/repos/apt/debian includedeb stretch "$OUTDIR"/*.deb