BUG: When adding options, i get sed errors with error

11 views
Skip to first unread message

ilya musayev

unread,
Jan 23, 2014, 4:45:30 PM1/23/14
to rerun-...@googlegroups.com
+ /usr/lib/rerun/modules//stubbs/commands/add-option/script -m image-builder -c check -o diskspacecap --export false --default 5 --description 'Minimum diskpace for transinient build operation' --required false
Wrote option metadata: /usr/lib/rerun/modules//image-builder/options/diskspacecap/metadata
Updated command metadata:  /usr/lib/rerun/modules//image-builder/commands/check/metadata
sed: -e expression #1, char 88: unknown option to `s'
ERROR: Error updating command script header

ilya musayev

unread,
Jan 23, 2014, 8:58:56 PM1/23/14
to rerun-...@googlegroups.com
Solution:


--- /usr/lib/rerun/modules/stubbs/lib/functions.sh.orig 2014-01-24
00:15:02.009369662 +0000
+++ /usr/lib/rerun/modules/stubbs/lib/functions.sh      2014-01-24
00:13:57.891775097 +0000
@@ -310,10 +310,12 @@
    local variables=$(stubbs_option_variables $moddir $command) 
    local usage=$(stubbs_command_usage $moddir $command)

+# Alter the delimiter from "," to "!", fixes the issue if description
contains 
+# a coma and breaks sed delimeter
    sed "
-        s,#/ command: .*,#/ command: $module:$command: \"$description
\",
-        s,#/ option-variables: .*,#/ option-variables: $variables,
-        s,#/ usage: .*,#/ usage: rerun $module:$command $usage,
+        s!#/ command: .*!#/ command: $module:$command: \"$description
\"!
+        s!#/ option-variables: .*!#/ option-variables: $variables!
+        s!#/ usage: .*!#/ usage: rerun $module:$command $usage!
        " $command_script 
    # Generate output to stdout.
Reply all
Reply to author
Forward
0 new messages