aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.bashrc_third_party
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-08-13 23:50:48 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2016-08-13 23:50:48 +0200
commit8fec942ab9913a38423a4cfea37d29ea304ddd0e (patch)
tree5a7ea2c281ee34840ce6d4db5232707ff004f464 /.bashrc_third_party
parentfix ShellCheck warnings (diff)
downloadlinux-home-8fec942ab9913a38423a4cfea37d29ea304ddd0e.tar.gz
linux-home-8fec942ab9913a38423a4cfea37d29ea304ddd0e.zip
code style
Diffstat (limited to '')
-rw-r--r--.bashrc_third_party46
1 files changed, 23 insertions, 23 deletions
diff --git a/.bashrc_third_party b/.bashrc_third_party
index 6d1e28c..48ea0b9 100644
--- a/.bashrc_third_party
+++ b/.bashrc_third_party
@@ -1,45 +1,45 @@
#!/usr/bin/env bash
if [ -n "${BASHRC_THIRD_PARTY+x}" ]; then
- return 0
+ return 0
else
- readonly BASHRC_THIRD_PARTY=1
+ readonly BASHRC_THIRD_PARTY=1
fi
ensure_symlinks_enabled() {
- case "${CYGWIN:-}" in
- *winsymlinks:native*) ;;
- *winsymlinks:nativestrict*) ;;
-
- *)
- echo "${FUNCNAME[0]}: native Windows symlinks aren't enabled in Cygwin" >&2
- return 1
- ;;
- esac
+ case "${CYGWIN:-}" in
+ *winsymlinks:native*) ;;
+ *winsymlinks:nativestrict*) ;;
+
+ *)
+ echo "${FUNCNAME[0]}: native Windows symlinks aren't enabled in Cygwin" >&2
+ return 1
+ ;;
+ esac
}
symlink_preferences() (
- set -o errexit
+ set -o errexit
- ensure_symlinks_enabled
+ ensure_symlinks_enabled
- if [ "$#" -ne 2 ]; then
- echo "usage: ${FUNCNAME[0]} SRC_DIR DEST_DIR" >&2
- return 1
- fi
+ if [ "$#" -ne 2 ]; then
+ echo "usage: ${FUNCNAME[0]} SRC_DIR DEST_DIR" >&2
+ return 1
+ fi
- local src_dir="$1"
- local dest_dir="$2"
+ local src_dir="$1"
+ local dest_dir="$2"
- [ -d "$dest_dir" ] || mkdir -p "$dest_dir"
+ mkdir -p "$dest_dir"
- find "$src_dir" -maxdepth 1 -type f -exec ln --force -s {} "$dest_dir" \;
+ find "$src_dir" -maxdepth 1 -type f -exec ln --force -s {} "$dest_dir" \;
)
symlink_sublime_preferences() {
- symlink_preferences "$HOME/.Sublime Text 3" "$APPDATA/Sublime Text 3/Packages/User"
+ symlink_preferences "$HOME/.Sublime Text 3" "$APPDATA/Sublime Text 3/Packages/User"
}
symlink_ghc_preferences() {
- symlink_preferences "$HOME/.GHC" "$APPDATA/ghc"
+ symlink_preferences "$HOME/.GHC" "$APPDATA/ghc"
}