Guest User

Untitled

a guest
Aug 20th, 2019
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function unjar {
  2. jar_name=${1}
  3. dir_name=${jar_name}_dir
  4. mkdir -p ${dir_name}
  5. pushd ${dir_name}
  6. jar xf ../${jar_name}
  7. popd
  8. }
  9.  
  10. function unjarshadowed {
  11. unjar $1
  12. pushd ${1}_dir
  13. for j in $(find $(pwd) -type f|egrep 'jar$')
  14. do
  15. parent=$(dirname $j)
  16. jar_name=$(basename $j)
  17. pushd $parent
  18. unjar $jar_name
  19. rm -f $jar_name
  20. popd
  21. done
  22. popd
  23. }
RAW Paste Data