fix: bootstrap.sh make it work on WSL

This commit is contained in:
Pratik Tripathy
2024-07-02 13:09:51 +05:30
parent a312e362c1
commit 6a308e0a9e
2 changed files with 49 additions and 50 deletions

View File

@@ -83,7 +83,8 @@ main() {
case $(uname -a) in
Linux*)
OS="linux"
OS="kde-neon"
[ "$XDG_CURRENT_DESKTOP" = "KDE" ] && OS="kde-neon"
;;
Darwin*)
@@ -100,18 +101,16 @@ main() {
cd -P "$(dirname "$0")" || exit
# Copy all files in "Common" dotfiles to $HOME directory ("~")
find "./common" -type f -not -path '*.DS_Store' -not -path '*.directory' | while read -r file;
do
file_target_location="${file/.\/common/$HOME}"
source_file_location="${file/./$PWD}"
find "./common" -type f -not -path '*.DS_Store' -not -path '*.directory' | while read -r file; do
file_target_location="${HOME}${file#./common}"
source_file_location="${PWD}${file#.}"
place_dotfile_at_target_location "$source_file_location" "$file_target_location" "$TS"
done
# Copy platform specific files to $HOME directory ("~")
find "./${OS}" -type f -not -path '*.DS_Store' -not -path '*.directory' | while read -r file;
do
file_target_location="${file/.\/${OS}/$HOME}"
source_file_location="${file/./$PWD}"
find "./${OS}" -type f -not -path '*.DS_Store' -not -path '*.directory' | while read -r file; do
file_target_location="${HOME}${file#./${OS}}"
source_file_location="${PWD}${file#.}"
place_dotfile_at_target_location "$source_file_location" "$file_target_location" "$TS"
done
}

View File

@@ -49,7 +49,7 @@ if [ "$(uname -s)" = "Linux" ]; then
export CUDA_CACHE_PATH="XDG_CACHE_HOME/nv"
# Map caps-lock to escape TIP: also added to /etc/profile
setxkbmap -option caps:escape
command -v setxkbmap >/dev/null && setxkbmap -option caps:escape
fi
export QT_PLUGIN_PATH="$HOME/local/lib/qt/plugins/:"