Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3.  
  4. export TZ="Australia/Brisbane"
  5.  
  6. # Permanent directory to store the user-data directory of your 'fresh'
  7. # Chrome configuration.
  8. fresh_dir="$HOME/.fresh-chrome"
  9.  
  10. # Temporary directory in which to create new user-data directories for
  11. # temporary Chrome instances.
  12. tmp_dir="/tmp"
  13.  
  14.  
  15.  
  16. ### Main script begins
  17.  
  18. set -e
  19.  
  20. timestamp=`date +%Y%m%d%H%M%S`
  21.  
  22. if [[ -e "$fresh_dir" ]]; then
  23. user_dir="$tmp_dir/chrome-$timestamp-$RANDOM"
  24. cp -r "$fresh_dir" "$user_dir"
  25. google-chrome "--user-data-dir=$fresh_dir"
  26. else
  27. google-chrome "--user-data-dir=$fresh_dir"
  28. fi
Add Comment
Please, Sign In to add comment