mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Change script names & remove extensions
This commit is contained in:
44
scripts/linkdotfiles
Executable file
44
scripts/linkdotfiles
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
source ../.profile
|
||||
|
||||
cd $HOME
|
||||
echo cd `pwd`
|
||||
|
||||
files=`ls -A $DOTFILES | awk '/^\..*/ && !/\.config$/ && !/\.git$/ && !/\.gitignore$/'`
|
||||
homepath=`echo $DOTFILES | sed "s|$HOME/||g"`
|
||||
conffiles=`ls -A "$DOTFILES/.config"`
|
||||
confpath=`echo $homepath | sed "s|.config/||g"`
|
||||
userhome=$HOME
|
||||
|
||||
for file in $files; do
|
||||
ln -sfv $homepath/$file .
|
||||
done
|
||||
ln -sfv .profile .zprofile
|
||||
|
||||
mkdir -p .config && cd .config/
|
||||
echo cd `pwd`
|
||||
for file in $conffiles; do
|
||||
ln -sfv $confpath/.config/$file .
|
||||
done
|
||||
|
||||
cd $HOME
|
||||
mkdir -p .local/share/ && cd .local/share
|
||||
echo cd `pwd`
|
||||
ln -sfv $DOTFILES/fonts .
|
||||
|
||||
sudo -s << EOF
|
||||
cd ~
|
||||
echo -n "cd "
|
||||
pwd
|
||||
|
||||
ln -sfv $userhome/.vimrc .
|
||||
ln -sfv $userhome/.vim/ .
|
||||
ln -sfv $userhome/.gtkrc-2.0 .
|
||||
|
||||
mkdir -p .config && cd .config/
|
||||
echo -n "cd "
|
||||
pwd
|
||||
ln -sfv $userhome/.config/gtk-3.0 .
|
||||
EOF
|
Reference in New Issue
Block a user