mirror of
https://github.com/KevinMidboe/dotfiles.git
synced 2025-10-29 17:40:19 +00:00
run using bash & try sudo cp to /usr/local/bin
This commit is contained in:
18
install.sh
18
install.sh
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
export REPO="git@github.com:KevinMidboe/dotfiles"
|
||||
export DOT_CONFIG_FOLDER="$HOME/.config"
|
||||
|
||||
@@ -7,6 +8,7 @@ echo "Cloning github repo"
|
||||
git clone --depth=1 -b main $REPO $DOT_CONFIG_FOLDER
|
||||
|
||||
cd $DOT_CONFIG_FOLDER
|
||||
git pull origin main
|
||||
|
||||
# create symlinks
|
||||
echo "Creating symlinks"
|
||||
@@ -15,11 +17,21 @@ ln -s $HOME/.config/wakatime.cfg $HOME/.wakatime.cfg
|
||||
|
||||
# copy script files
|
||||
echo "Copying scripts to /usr/local/bin"
|
||||
cp scripts/* /usr/local/bin/
|
||||
cd scripts
|
||||
if [ $EUID != 0 ]; then
|
||||
for script in ./*; do
|
||||
echo " copying $script"
|
||||
sudo cp $script /usr/local/bin/
|
||||
done
|
||||
|
||||
sudo chmod 755 -R /usr/local/bin/
|
||||
fi
|
||||
cd ..
|
||||
|
||||
# run install scripts
|
||||
for script in install/*.sh; do
|
||||
echo ""
|
||||
echo "Running install script $script..."
|
||||
sh "$script"
|
||||
bash "$script"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user