#!/bin/bash source_dir="./config" target_config_dir="$HOME/.config" nodejs_version="v22.21.0" current_dir="$(pwd)" # cp ./core-setup/arch-surface.conf /boot/loader/entries/arch-surface.conf # cp ./core-setup/cpupower /etc/default/cpupower cd core-setup && sh setup cd $current_dir # Ensure fish/fisher setup + install plugins if fish -c "which fisher" >/dev/null 2>&1; then echo "fisher is installed" else echo "fisher not found. installing." # curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher" fi tree . for dir in $source_dir/*/; do echo ">>>"$dir echo "Raw dir value: '$dir'" ls -ld "$dir" if [ -d "$dir" ]; then # Check if it's a directory echo "asdkgjnsgjsdkgan" dir_name=$(basename "$dir") source=$source_dir"/"$dir_name target=$target_config_dir"/"$dir_name echo "Source: " $source echo "Target: " $target # rm -rf $target if [ "$(ls -A $source)" ]; then mkdir -p $target cp -rf "$source/"* "$target/" else echo "$source is empty" fi fi done fish -c "fisher update" fish -c "set --universal nvm_default_version $nodejs_version" if fish -c "which node" >/dev/null 2>&1; then version=$(node --version) echo "node is installed: $version" else echo "nodejs not found. installing." fish -c "nvm install $nodejs_version" fish -c "nvm use $nodejs_version" fi