-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsourceitall.sh
More file actions
executable file
·41 lines (32 loc) · 900 Bytes
/
sourceitall.sh
File metadata and controls
executable file
·41 lines (32 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
###########
#
# just slightly easier to source it all
# and set resource limits
#
###########
thisfile=$0
dotfilesdir="$HOME/dotfiles"
workingdir="$HOME/dotworking"
# variables for public consumption of $dotfiles
somepersonaldomain="petalphile.com"
someworkplace="myjobplace.com"
if [ ! -e $workingdir ]; then
mkdir $workingdir
fi
rsync -av --exclude=".git" $dotfilesdir/ $workingdir
# regex that shit
perl -pi -e "s/somepersonaldomain.com/$somepersonaldomain/g" $workingdir/*
perl -pi -e "s/someworkplace.com/$someworkplace/g" $workingdir/*
# see if this is a box with a usb dac
usbsound=`aplay -l |awk '/USB/ {print $3}'`
if [ -z $usbsound ]; then
perl -pi -e "s/USBDEVICE/$usbsound/g" .asoundrc
cp .asoundrc $HOME
fi
# push it home
for dotfile in .bashrc .bash_aliases .vimrc .vim .config .inputrc
do
cp -r $workingdir/$dotfile $HOME
done
source $HOME/.bash_aliases