add Xresources
This commit is contained in:
parent
943e9b5da5
commit
a0cf29ab0b
2 changed files with 34 additions and 6 deletions
1
Xresources
Symbolic link
1
Xresources
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../.cache/wal/colors.Xresources
|
35
_install.sh
35
_install.sh
|
@ -25,9 +25,10 @@ function die() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function link() {
|
function install() {
|
||||||
src=$1
|
method=$1
|
||||||
dst=$2
|
src=$2
|
||||||
|
dst=$3
|
||||||
if [ -e $dst ]; then
|
if [ -e $dst ]; then
|
||||||
if [ -L $dst ]; then
|
if [ -L $dst ]; then
|
||||||
# already symlinked
|
# already symlinked
|
||||||
|
@ -43,8 +44,26 @@ function link() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $method in
|
||||||
|
link)
|
||||||
# Update existing or create new symlinks
|
# Update existing or create new symlinks
|
||||||
ln -vsf $src $dst
|
ln -vsf $src $dst
|
||||||
|
;;
|
||||||
|
copy)
|
||||||
|
cp -a $src $dst
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
warn "Unknown install method: $1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function link() {
|
||||||
|
install link $1 $2
|
||||||
|
}
|
||||||
|
|
||||||
|
function copy() {
|
||||||
|
install copy $1 $2
|
||||||
}
|
}
|
||||||
|
|
||||||
function unpack_tarball() {
|
function unpack_tarball() {
|
||||||
|
@ -93,7 +112,15 @@ for path in * ; do
|
||||||
if [ $(expr match $path '^_') -eq 1 ]; then
|
if [ $(expr match $path '^_') -eq 1 ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
link $basedir/$path $homedir/.$path
|
|
||||||
|
src=$basedir/$path
|
||||||
|
dst=$homedir/.$path
|
||||||
|
|
||||||
|
if [ -L $src ]; then
|
||||||
|
copy $src $dst
|
||||||
|
else
|
||||||
|
link $src $dst
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p $homedir/.config
|
mkdir -p $homedir/.config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue