Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. $ cat /usr/libexec/thunar-archive-plugin/file-roller.tap
  2. #!/bin/sh
  3. #
  4. # vi:set et ai sw=2 sts=2 ts=2:
  5. # -
  6. # file-roller.tap - Wrapper script to create and extract archive files
  7. # in Thunar, via the thunar-archive-plugin, using the
  8. # file-roller archive manager.
  9. #
  10. # Copyright (c) 2006 Benedikt Meurer <benny@xfce.org>
  11. # Copyright (c) 2011 Jannis Pohlmann <jannis@xfce.org>
  12. #
  13. # This program is free software; you can redistribute it and/or
  14. # modify it under the terms of the GNU General Public License as
  15. # published by the Free Software Foundation; either version 2 of
  16. # the License, or (at your option) any later version.
  17. #
  18. # This program is distributed in the hope that it will be useful,
  19. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. # GNU General Public License for more details.
  22. #
  23. # You should have received a copy of the GNU General Public
  24. # License along with this program; if not, write to the Free
  25. # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  26. # Boston, MA 02110-1301, USA.
  27.  
  28. # determine the action and the folder, $@ then contains only the files
  29. action=$1; shift;
  30. folder=$1; shift;
  31.  
  32. # check the action
  33. case $action in
  34. create)
  35. exec file-roller "--default-dir=$folder" --add "$@"
  36. ;;
  37.  
  38. extract-here)
  39. exec file-roller "--extract-to=$(pwd)" --extract-here --force "$@"
  40. ;;
  41.  
  42. extract-to)
  43. exec file-roller "--default-dir=$folder" --extract "$@"
  44. ;;
  45.  
  46. *)
  47. echo "Unsupported action '$action'" >&2
  48. exit 1
  49. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement