Initial commit
This commit is contained in:
commit
7439d611ea
3 changed files with 135 additions and 0 deletions
28
prepare_env.sh
Normal file
28
prepare_env.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
if [ -z "$STORAGE" ]; then
|
||||
echo "\$STORAGE is empty, please set it as a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# Prepare stow (perl libs and binary) - if necessary
|
||||
if [ ! -f "$(which stow)" ]; then
|
||||
mkdir -p $HOME/.local/{bin,share/{doc,info,man/man8,perl5}}
|
||||
|
||||
ln -s $STORAGE/stowed/stow/.local/bin/stow $HOME/.local/bin
|
||||
ln -s $STORAGE/stowed/stow/.local/bin/chkstow $HOME/.local/bin
|
||||
ln -s $STORAGE/stowed/stow/.local/share/perl5/Stow $HOME/.local/share/perl5
|
||||
ln -s $STORAGE/stowed/stow/.local/share/perl5/Stow.pm $HOME/.local/share/perl5
|
||||
fi
|
||||
|
||||
stow="stow --target $HOME"
|
||||
# Edit this folder to wherever you store dotfiles / stowed files
|
||||
stow_dir=$STORAGE/stowed
|
||||
|
||||
# Restore stowed config
|
||||
cd $stow_dir
|
||||
|
||||
# Copy this example, changing the folder to be restored
|
||||
# $stow bash
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue