summaryrefslogtreecommitdiff
path: root/sysutils/rcm/patches/patch-bin_rcup.in
blob: 3de95801d5908527d7677348021a7457320e60d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-bin_rcup.in,v 1.1 2017/12/19 11:45:25 leot Exp $

- Avoid to use the `==' (non-POSIX) operator in test(1).
- Quote args initialization. This fixes a problem with NetBSD sh(1) leading to
  `local: ${HOME}/.dotfiles: bad variable name' error.

Part of upstream:

 <https://github.com/thoughtbot/rcm/commit/f4f6a0722a3f75b2b1e0d820eb6fc3c9d33fa0eb>

--- bin/rcup.in.orig	2016-12-26 21:56:47.000000000 +0000
+++ bin/rcup.in
@@ -136,7 +136,7 @@ is_linked() {
 
   if [ -h "$dest" ]; then
     local link_dest=$(readlink $dest)
-    [ "$link_dest" == "$src" ]
+    [ "$link_dest" = "$src" ]
   else
     return 1
   fi  
@@ -208,7 +208,7 @@ handle_command_line() {
   local never_symlink_dirs=
   local hostname=
   local generate=0
-  local args=$*
+  local args="$*"
   local undotted=
   local never_undotted=
   REPLACE_ALL=0