mirror of
https://github.com/KevinMidboe/dotfiles.git
synced 2025-10-29 01:20:20 +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"
|
export DOT_CONFIG_FOLDER="$HOME/.config"
|
||||||
|
|
||||||
# clone dotfiles repo
|
# clone dotfiles repo
|
||||||
echo "Cloning github repo"
|
printf "\n▽ Fetching files.."
|
||||||
git clone --depth=1 -b main $REPO $DOT_CONFIG_FOLDER
|
git clone --depth=1 -b main $REPO $DOT_CONFIG_FOLDER
|
||||||
|
|
||||||
cd $DOT_CONFIG_FOLDER
|
cd $DOT_CONFIG_FOLDER
|
||||||
git pull origin main
|
git pull origin main
|
||||||
|
|
||||||
# create symlinks
|
# create symlinks
|
||||||
echo "Creating symlinks"
|
printf "\n▽ Creating symlinks\n"
|
||||||
|
echo " ▫ .profile"
|
||||||
ln -s $HOME/.config/profile $HOME/.profile
|
ln -s $HOME/.config/profile $HOME/.profile
|
||||||
|
echo " ▫ .wakatime.cfg"
|
||||||
ln -s $HOME/.config/wakatime.cfg $HOME/.wakatime.cfg
|
ln -s $HOME/.config/wakatime.cfg $HOME/.wakatime.cfg
|
||||||
|
|
||||||
# copy script files
|
# copy script files
|
||||||
echo "Copying scripts to /usr/local/bin"
|
printf "\n▽ Copying scripts to /usr/local/bin\n"
|
||||||
cd scripts
|
cd scripts
|
||||||
if [ $EUID != 0 ]; then
|
if [ $EUID != 0 ]; then
|
||||||
for script in ./*; do
|
for script in ./*; do
|
||||||
echo " copying $script"
|
echo " ▫ copying $script"
|
||||||
sudo cp $script /usr/local/bin/
|
sudo cp $script /usr/local/bin/
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -29,9 +31,9 @@ fi
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# run install scripts
|
# run install scripts
|
||||||
|
printf "\n▽ Running install scripts\n"
|
||||||
for script in install/*.sh; do
|
for script in install/*.sh; do
|
||||||
echo ""
|
printf " ▫ %s\n" $script
|
||||||
echo "Running install script $script..."
|
|
||||||
bash "$script"
|
bash "$script"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -14,5 +14,5 @@ apps=(
|
|||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
brew install "${apps[@]}" --cask
|
brew install "${apps[@]}" --cask
|
||||||
else
|
else
|
||||||
echo "skipping cask for non-macos platform"
|
echo " ▶ skipping cask for non-macos platform"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user