1#! /usr/bin/env bash 2 3export SELF_HOME="$HOME/.local/share/self" 4if [ -n "$XDG_DATA_HOME" ] 5 then export SELF_HOME="$XDG_DATA_HOME/self" 6fi 7 8if [ ! -d $SELF_HOME ]; then 9 mkdir -p $SELF_HOME 10fi 11 12if [ ! -d $SELF_HOME/objects ]; then 13 mkdir -p $SELF_HOME/objects 14 cp -r $SELF_ROOT/share/self/objects/* $SELF_HOME/objects 15 chmod -R +w $SELF_HOME/objects 16fi 17 18exec $SELF_ROOT/bin/Self.wrapped "$@"