Guest User

Untitled

a guest
Jun 14th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. DESTDIR?=/usr/local/bin
  2. install_path=$(DESTDIR)
  3.  
  4. script_name_1=encrypt-file-aes256
  5. script_name_2=decrypt-file-aes256
  6.  
  7. user_id=$(shell whoami)
  8. group_id=$(shell id -gn)
  9.  
  10. .PHONY: check
  11. .PHONY: install
  12. .PHONY: uninstall
  13.  
  14. check:
  15. [ -f $(script_name_1) ] && [ -f $(script_name_2) ] && sha512sum --check SHA512SUMS --status && echo "OK: Files are prepared. You may use make install command now." || echo "ERROR: Files are missing and / or hashsum mismatch!"
  16.  
  17. install:
  18. install --verbose --mode=0755 --owner=$(user_id) --group=$(group_id) --target-directory=$(install_path) $(script_name_1) $(script_name_2)
  19.  
  20. uninstall:
  21. rm $(install_path)/$(script_name_1) $(install_path)/$(script_name_2)
Add Comment
Please, Sign In to add comment