From 3882ecaee9c088e10c944176c1a781e2603fdbbe Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 30 Aug 2018 12:25:56 -0300 Subject: Run Linux commands only when in Linux --- bash/env.sh | 4 +++- bash/xdg.sh | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'bash') diff --git a/bash/env.sh b/bash/env.sh index 9eeab517..64f79c4d 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 ca8ee570..6b8981a3 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 +} -- cgit v1.3