summaryrefslogtreecommitdiff
path: root/share/rcm.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'share/rcm.sh.in')
-rw-r--r--share/rcm.sh.in18
1 files changed, 9 insertions, 9 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in
index 809fca3..2ce68d4 100644
--- a/share/rcm.sh.in
+++ b/share/rcm.sh.in
@@ -12,7 +12,6 @@ DEFAULT_DOTFILES_DIR="$HOME/.dotfiles"
MKDIR=mkdir
INSTALL=rcup
ROOT_DIR="$HOME"
-HOSTNAME="$(hostname | sed -e 's/\..*//')"
ln_v() {
$VERBOSE "'$1' -> '$2'"
@@ -96,15 +95,16 @@ handle_common_flags() {
fi
}
-handle_metadata_flags() {
- local arg_tags="$1"
- local dotfiles_dirs="$2"
+determine_hostname() {
+ local name="$1"
- : ${TAGS:=$arg_tags}
- : ${DOTFILES_DIRS:=$dotfiles_dirs}
-
- $DEBUG "TAGS: $TAGS"
- $DEBUG "DOTFILES_DIRS: $DOTFILES_DIRS"
+ if [ -n "$name" ]; then
+ echo "$name"
+ elif [ -n "$HOSTNAME" ]; then
+ echo "$HOSTNAME"
+ else
+ echo "$(hostname | sed -e 's/\..*//')"
+ fi
}
run_hooks() {