mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
fix: bootstrap.sh make it work on WSL
This commit is contained in:
17
bootstrap.sh
17
bootstrap.sh
@@ -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
|
||||
}
|
||||
|
||||
@@ -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/:"
|
||||
|
||||
Reference in New Issue
Block a user