#! /bin/zsh source $(dirname $0)/paths if [[ ! -d $be_path ]]; then sudo mkdir $be_path 2> /dev/null fi desired_perms=666 state_perms=`stat --format %a $state_file` task_perms=`stat --format %a $task_file` if [[ ($desired_perms != $state_perms) || ($desired_perms != $task_perms) ]]; then su -c "chmod $desired_perms $state_file $task_file" fi