better install environment

This commit is contained in:
2024-11-06 14:26:40 +01:00
parent b9492f648e
commit 08c1f75051
2 changed files with 9 additions and 7 deletions

View File

@@ -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

View File

@@ -14,5 +14,5 @@ apps=(
if [ "$(uname)" == "Darwin" ]; then
brew install "${apps[@]}" --cask
else
echo "skipping cask for non-macos platform"
echo "skipping cask for non-macos platform"
fi