aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-08-30 12:25:56 -0300
committerEuAndreh <eu@euandre.org>2018-08-30 12:25:56 -0300
commit3882ecaee9c088e10c944176c1a781e2603fdbbe (patch)
treedf95f0ff85f091457341f21c4ff6a848e390a6a8
parentAdd security course channel. (diff)
downloaddotfiles-3882ecaee9c088e10c944176c1a781e2603fdbbe.tar.gz
dotfiles-3882ecaee9c088e10c944176c1a781e2603fdbbe.tar.xz
Run Linux commands only when in Linux
-rw-r--r--bash/env.sh4
-rw-r--r--bash/xdg.sh8
2 files changed, 8 insertions, 4 deletions
diff --git a/bash/env.sh b/bash/env.sh
index 9eeab51..64f79c4 100644
--- a/bash/env.sh
+++ b/bash/env.sh
@@ -67,7 +67,9 @@ isLinux && {
#
export GUIX_PROFILE="$HOME/.guix-profile/etc/profile"
-source "$GUIX_PROFILE"
+isLinux && {
+ source "$GUIX_PROFILE"
+}
export PATH="$HOME/.guix-profile/bin${PATH:+:}$PATH"
export PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" # after running guix package -i glibc-utf8-locales
diff --git a/bash/xdg.sh b/bash/xdg.sh
index ca8ee57..6b8981a 100644
--- a/bash/xdg.sh
+++ b/bash/xdg.sh
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
-mkdir -p ~/.local/share/applications/
+isLinux && {
+ mkdir -p ~/.local/share/applications/
-cat << EOF > ~/.local/share/applications/evince-andreh.desktop
+ cat << EOF > ~/.local/share/applications/evince-andreh.desktop
[Desktop Entry]
Type=Application
Name=evince
@@ -12,4 +13,5 @@ Exec=evince
Categories=Network;WebBrowserEOF
EOF
-xdg-mime default evince-andreh.desktop application/pdf
+ xdg-mime default evince-andreh.desktop application/pdf
+}