build.sh 863 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/bash
  2. input=$1
  3. if [ -z $input ]; then
  4. echo "debian or archlinux"
  5. exit 1
  6. fi
  7. if [ $input = "debian" ]; then
  8. mkdir -p ./ScreenInterLock_deb/etc/screen_inter_lock
  9. mkdir -p ./ScreenInterLock_deb/usr/bin
  10. mkdir -p ./ScreenInterLock_deb/etc/screen_inter_lock/default_images
  11. ln ../ScreenInterLock ./ScreenInterLock_deb/usr/bin/ScreenInterLock
  12. ln ../default_images/* ./ScreenInterLock_deb/etc/screen_inter_lock/default_images
  13. dpkg-deb --build ./ScreenInterLock_deb ScreenInterLock.deb
  14. rm -r ./ScreenInterLock_deb/etc
  15. rm -r ./ScreenInterLock_deb/usr
  16. elif [ $input = "archlinux" ]; then
  17. ln ../ScreenInterLock ./ScreenInterLock_archlinux/
  18. cd ./ScreenInterLock_archlinux
  19. makepkg
  20. rm -r pkg
  21. rm -r src
  22. unlink ScreenInterLock
  23. mv *.zst ../
  24. fi