depot/third_party/nixpkgs/pkgs/development/interpreters/self/self
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

18 lines
398 B
Bash
Executable file

#! /usr/bin/env bash
export SELF_HOME="$HOME/.local/share/self"
if [ -n "$XDG_DATA_HOME" ]
then export SELF_HOME="$XDG_DATA_HOME/self"
fi
if [ ! -d $SELF_HOME ]; then
mkdir -p $SELF_HOME
fi
if [ ! -d $SELF_HOME/objects ]; then
mkdir -p $SELF_HOME/objects
cp -r $SELF_ROOT/share/self/objects/* $SELF_HOME/objects
chmod -R +w $SELF_HOME/objects
fi
exec $SELF_ROOT/bin/Self.wrapped "$@"