Advertisement
Guest User

check_module.patch

a guest
May 9th, 2016
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Description: Check if we have a module
  2.  
  3. --- ./makemod~ 2016-05-09 20:28:07.549872042 +0300
  4. +++ ./makemod 2016-05-09 20:41:58.859807984 +0300
  5. @@ -8,6 +8,22 @@
  6. exit 1
  7. fi
  8.  
  9. +if [ -f "$2" ]; then
  10. + read -p "-- This folder already contains a file $2.
  11. + Do you want to replace the existing file? (y/n) [n] " yn
  12. + if [ $yn"n" = "yn" ]; then
  13. + rm "$2"
  14. + sleep 1
  15. + if [ -f "$2" ]; then
  16. + echo "-- We leave a file $2 for the admin to consider."
  17. + exit 1
  18. + fi
  19. + else
  20. + echo "-- Returning to the shell."
  21. + exit 1
  22. + fi
  23. +fi
  24. +
  25. # .sxz extension uses xz compression:
  26. COMPR="xz"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement