aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.bashrc_third_party
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-08-14 11:42:56 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2016-08-14 11:42:56 +0200
commit3b713427c07f042852c826efb0010e4bb3404b0c (patch)
tree664918bc4a11cab4f5ac9894e7b16a083f03e2a2 /.bashrc_third_party
parentexport PYTHONSTARTUP (diff)
downloadlinux-home-3b713427c07f042852c826efb0010e4bb3404b0c.tar.gz
linux-home-3b713427c07f042852c826efb0010e4bb3404b0c.zip
set -o errexit -o nounset -o pipefail in functions
Diffstat (limited to '')
-rw-r--r--.bashrc_third_party18
1 files changed, 11 insertions, 7 deletions
diff --git a/.bashrc_third_party b/.bashrc_third_party
index 48ea0b9..e90e39a 100644
--- a/.bashrc_third_party
+++ b/.bashrc_third_party
@@ -19,15 +19,15 @@ ensure_symlinks_enabled() {
}
symlink_preferences() (
- set -o errexit
-
- ensure_symlinks_enabled
+ set -o errexit -o nounset -o pipefail
if [ "$#" -ne 2 ]; then
echo "usage: ${FUNCNAME[0]} SRC_DIR DEST_DIR" >&2
return 1
fi
+ ensure_symlinks_enabled
+
local src_dir="$1"
local dest_dir="$2"
@@ -36,10 +36,14 @@ symlink_preferences() (
find "$src_dir" -maxdepth 1 -type f -exec ln --force -s {} "$dest_dir" \;
)
-symlink_sublime_preferences() {
+symlink_sublime_preferences() (
+ set -o errexit -o nounset -o pipefail
+
symlink_preferences "$HOME/.Sublime Text 3" "$APPDATA/Sublime Text 3/Packages/User"
-}
+)
+
+symlink_ghc_preferences() (
+ set -o errexit -o nounset -o pipefail
-symlink_ghc_preferences() {
symlink_preferences "$HOME/.GHC" "$APPDATA/ghc"
-}
+)