forked from matschaffer/profile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.conf
More file actions
26 lines (25 loc) · 854 Bytes
/
profile.conf
File metadata and controls
26 lines (25 loc) · 854 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
# Pushes a non-git version of .profile.d to the specified server.
# Usage: profile_push <server>
#
# WARNING: this will remove any existing .profile.d, .profile or .bashrc on that server.
profile_push() {
tar cf - --exclude=".git" --exclude="repository" -C "${HOME}" .profile.d | \
ssh $1 "rm -rf .profile.d .profile .bashrc;
mkdir .profile.d;
tar xf -;
ln -s .profile.d/core/init .profile"
}
# Should link up dotfiles to your home directory.
#
# WARNING: Not working correctly at the moment
link_dotfiles() {
local dotfile path
PROFILE_PATH="${HOME}/.profile.d"
for dotfile in `ls -1 ${PROFILE_PATH}/core/dotfiles`; do
echo ${dotfile}
path="${HOME}/.`basename ${dotfile}`"
[ -e "${path}" ] && rm -ri "${path}"
ln -s "${PROFILE_PATH}/core/dotfiles/${dotfile}" "${path}"
done
}
umask 002