mirror of
https://github.com/KevinMidboe/dotfiles.git
synced 2025-10-29 17:40:19 +00:00
better install environment
This commit is contained in:
14
install.sh
14
install.sh
@@ -4,23 +4,25 @@ export REPO="git@github.com:KevinMidboe/dotfiles"
|
||||
export DOT_CONFIG_FOLDER="$HOME/.config"
|
||||
|
||||
# clone dotfiles repo
|
||||
echo "Cloning github repo"
|
||||
printf "\n▽ Fetching files.."
|
||||
git clone --depth=1 -b main $REPO $DOT_CONFIG_FOLDER
|
||||
|
||||
cd $DOT_CONFIG_FOLDER
|
||||
git pull origin main
|
||||
|
||||
# create symlinks
|
||||
echo "Creating symlinks"
|
||||
printf "\n▽ Creating symlinks\n"
|
||||
echo " ▫ .profile"
|
||||
ln -s $HOME/.config/profile $HOME/.profile
|
||||
echo " ▫ .wakatime.cfg"
|
||||
ln -s $HOME/.config/wakatime.cfg $HOME/.wakatime.cfg
|
||||
|
||||
# copy script files
|
||||
echo "Copying scripts to /usr/local/bin"
|
||||
printf "\n▽ Copying scripts to /usr/local/bin\n"
|
||||
cd scripts
|
||||
if [ $EUID != 0 ]; then
|
||||
for script in ./*; do
|
||||
echo " copying $script"
|
||||
echo " ▫ copying $script"
|
||||
sudo cp $script /usr/local/bin/
|
||||
done
|
||||
|
||||
@@ -29,9 +31,9 @@ fi
|
||||
cd ..
|
||||
|
||||
# run install scripts
|
||||
printf "\n▽ Running install scripts\n"
|
||||
for script in install/*.sh; do
|
||||
echo ""
|
||||
echo "Running install script $script..."
|
||||
printf " ▫ %s\n" $script
|
||||
bash "$script"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user