skobkin
BASH
2016.04.20 03:06
#!/bin/bash
CACHE_DIR=/tmp/opera
CACHE_SIZE=1073741824
CACHE_MEDIA_SIZE=1073741824
CACHE_CHMOD=770
OPERA_COMMAND="/usr/bin/opera-developer --disk-cache-dir=$CACHE_DIR --disk-cache-size=$CACHE_SIZE --media-cache-size=$CACHE_MEDIA_SIZE --enable-precache $@"
 
if [ -f $CACHE_DIR ];
then
  echo "Cache directory $CACHE_DIR exist."
else
  echo "Cache directory $TMPDIR does not exist. Creating..."
  mkdir $CACHE_DIR
  chmod -R $CACHE_CHMOD $CACHE_DIR
fi
 
echo "Running Opera"
eval $OPERA_COMMAND