29 lines
498 B
Bash
Executable File
29 lines
498 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
shopt -s extglob
|
|
for x in home/{any,"${OSTYPE%%+([[:digit:].])}"}/*
|
|
do
|
|
if [[ -f ${x}.dirs ]]
|
|
then
|
|
cat ${x}.dirs | xargs -I {} mkdir -p $HOME/{}
|
|
fi
|
|
if [[ -d $x ]]
|
|
then
|
|
stow -t $HOME -d $(dirname $x) $(basename $x)
|
|
fi
|
|
done
|
|
|
|
chmod 700 $HOME/.gnupg
|
|
|
|
for x in etc/{any,"${OSTYPE%%+([[:digit:].])}"}/*
|
|
do
|
|
if [[ -f ${x}.dirs ]]
|
|
then
|
|
cat ${x}.dirs | xargs -I {} sudo mkdir -p /etc/{}
|
|
fi
|
|
if [[ -d $x ]]
|
|
then
|
|
sudo stow -t /etc -d $(dirname $x) $(basename $x)
|
|
fi
|
|
done
|