mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
32 lines
749 B
Bash
Executable File
32 lines
749 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
|
|
export INFERNO_HOME="$HOME/.local/share/inferno"
|
|
if [ -n "$XDG_DATA_HOME" ]
|
|
then export INFERNO_HOME="$XDG_DATA_HOME/inferno"
|
|
fi
|
|
|
|
if [ ! -d $INFERNO_HOME ]; then
|
|
mkdir -p $INFERNO_HOME
|
|
fi
|
|
|
|
if [ ! -d $INFERNO_HOME/tmp ]; then
|
|
mkdir -p $INFERNO_HOME/tmp
|
|
fi
|
|
|
|
for d in $INFERNO_HOME/{acme,appl,dis,lib,man,module,usr/inferno}; do
|
|
if [ ! -d $d ]; then
|
|
mkdir -p $d
|
|
cp --no-preserve=all -r $INFERNO_ROOT/${d#$INFERNO_HOME/}/* $d/
|
|
chmod -R +w $d
|
|
fi
|
|
done
|
|
|
|
if [ ! -d $INFERNO_HOME/usr/$USER ]; then
|
|
mkdir -p $INFERNO_HOME/usr/$USER
|
|
cp -r $INFERNO_ROOT/usr/inferno/* $INFERNO_HOME/usr/$USER/
|
|
chmod -R +w $INFERNO_HOME/usr/$USER
|
|
fi
|
|
|
|
exec emu "$@" /dis/sh.dis -c "bind -b -c '#U*$INFERNO_HOME/' /; /dis/sh.dis"
|