Skip to content

Commit 692f612

Browse files
committed
Escape backslashes
1 parent b6d7ae6 commit 692f612

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/node_modules/@stdlib/_tools/scripts/publish_packages.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,11 @@ function publish( pkg, clbk ) {
487487
fs.copyFileSync( join( __dirname, 'templates', 'license_apache2.txt' ), join( dist, 'LICENSE' ) );
488488
command = [
489489
'# Extract pattern from all files:',
490-
'find '+dist+' -type f -name "*.js" -exec cat {} \; | sed -n \'/^\* ```/,/^\* ```/p\' | sed \'s/^\* ```text//\' | sed \'s/```$//\' > LICENSE.tmp',
490+
'find '+dist+' -type f -name "*.js" -exec cat {} \\; | sed -n \'/^\\* ```/,/^\\* ```/p\' | sed \'s/^\\* ```text//\' | sed \'s/```$//\' > LICENSE.tmp',
491491
'',
492492
'# Remove leading asterisks in each line including lines with only asterisks and no following text:',
493-
'sed -i \'s/^\* //\' LICENSE.tmp',
494-
'sed -i \'s/^\*//\' LICENSE.tmp',
493+
'sed -i \'s/^\\* //\' LICENSE.tmp',
494+
'sed -i \'s/^\\*//\' LICENSE.tmp',
495495
'',
496496
'# Check whether LICENSE.tmp is empty:',
497497
'if [ ! -s LICENSE.tmp ]; then',
@@ -503,19 +503,19 @@ function publish( pkg, clbk ) {
503503
' awk -v RS= \'!x[$0]++{print; print ""}\' LICENSE.out > LICENSE.tmp',
504504
'',
505505
' # Prepend individual licenses with respective heading:',
506-
' perl -0777 -pe \'s/^(The MIT License \(MIT\)\n\nCopyright \(c\) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others)/\* SpecialFunctions.jl <https:\/\/raw.githubusercontent.com\/JuliaMath\/SpecialFunctions.jl\/02a173fbe24a61c4b392aec17a9764ac5727feb1\/LICENSE>\n\n\1/\' LICENSE.tmp > LICENSE.out',
506+
' perl -0777 -pe \'s/The MIT License \\(MIT\\)\n\nCopyright \\(c\\) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others/\\* SpecialFunctions.jl \\<https:\\/\\/raw.githubusercontent.com\\/JuliaMath\\/SpecialFunctions.jl\\/02a173fbe24a61c4b392aec17a9764ac5727feb1\\/LICENSE\\>\n\nThe MIT License \\(MIT\\)\n\nCopyright \\(c\\) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others/\' LICENSE.tmp > LICENSE.out',
507507
'',
508-
' sed -i \'s/Copyright (c) 2011-2014, The OpenBLAS Project/\* OpenBLAS <https:\/\/raw.githubusercontent.com\/xianyi\/OpenBLAS\/\ndef146efed8d5908ea04e22668feeab7099599a0\/LICENSE>\n\nCopyright (c) 2011-2014, The OpenBLAS Project/\' LICENSE.out',
509-
' sed -i \'s/Copyright (c) 2013-2017 GitHub Inc./\* Electron <https:\/\/raw.githubusercontent.com\/electron\/electron\/\nc4cfb3e7110266b9d7ad80e1ae097c4db564501c\/LICENSE>\n\nCopyright (c) 2013-2017 GitHub Inc./\' LICENSE.out',
510-
' sed -i \'s/Boost Software License - Version 1.0 - August 17th, 2003/\* Boost <http:\/\/www.boost.org\/LICENSE_1_0.txt>\n\nBoost Software License - Version 1.0 - August 17th, 2003/\' LICENSE.out',
511-
' sed -i \'s/Copyright (c) 1984-2000 Stephen L. Moshier/\* Cephes <http:\/\/www.netlib.org\/cephes\/readme>\n\nCopyright (c) 1984-2000 Stephen L. Moshier/\' LICENSE.out',
508+
' sed -i \'s/Copyright (c) 2011-2014, The OpenBLAS Project/\\* OpenBLAS <https:\\/\\/raw.githubusercontent.com\\/xianyi\\/OpenBLAS\\/\ndef146efed8d5908ea04e22668feeab7099599a0\\/LICENSE>\n\nCopyright (c) 2011-2014, The OpenBLAS Project/\' LICENSE.out',
509+
' sed -i \'s/Copyright (c) 2013-2017 GitHub Inc./\\* Electron <https:\\/\\/raw.githubusercontent.com\\/electron\\/electron\\/\nc4cfb3e7110266b9d7ad80e1ae097c4db564501c\\/LICENSE>\n\nCopyright (c) 2013-2017 GitHub Inc./\' LICENSE.out',
510+
' sed -i \'s/Boost Software License - Version 1.0 - August 17th, 2003/\\* Boost <http:\\/\\/www.boost.org\\/LICENSE_1_0.txt>\n\nBoost Software License - Version 1.0 - August 17th, 2003/\' LICENSE.out',
511+
' sed -i \'s/Copyright (c) 1984-2000 Stephen L. Moshier/\\* Cephes <http:\\/\\/www.netlib.org\\/cephes\\/readme>\n\nCopyright (c) 1984-2000 Stephen L. Moshier/\' LICENSE.out',
512512
'',
513-
' sed -i \'s/Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved./\* FreeBSD <https:\/\/svnweb.freebsd.org\/base\/head\/license.html>\n\nCopyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved./\' LICENSE.out',
514-
' sed -i \'s/Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved./\* FDLIBM <http:\/\/www.netlib.org\/fdlibm\/LICENSE>\n\nCopyright (C) 2004 by Sun Microsystems, Inc. All rights reserved./\' LICENSE.out',
515-
' sed -i \'s/Copyright (c) 2009 The Go Authors. All rights reserved./\* Go <https:\/\/raw.githubusercontent.com\/golang\/go\/master\/LICENSE>\n\nCopyright (c) 2009 The Go Authors. All rights reserved./\' LICENSE.out',
513+
' sed -i \'s/Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved./\\* FreeBSD <https:\\/\\/svnweb.freebsd.org\\/base\\/head\\/license.html>\n\nCopyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved./\' LICENSE.out',
514+
' sed -i \'s/Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved./\\* FDLIBM <http:\\/\\/www.netlib.org\\/fdlibm\\/LICENSE>\n\nCopyright (C) 2004 by Sun Microsystems, Inc. All rights reserved./\' LICENSE.out',
515+
' sed -i \'s/Copyright (c) 2009 The Go Authors. All rights reserved./\\* Go <https:\\/\\/raw.githubusercontent.com\/golang\\/go\\/master\\/LICENSE>\n\nCopyright (c) 2009 The Go Authors. All rights reserved./\' LICENSE.out',
516516
'',
517-
' sed -i \'s/Copyright (c) 2015: Dahua Lin./\* StatsFuns.jl <https:\/\/raw.githubusercontent.com\/JuliaStats\/StatsFuns.jl\/\ne66dd973650c375bc1739c820e5b96bb5bd000a8\/LICENSE.md>\n\nCopyright (c) 2015: Dahua Lin./\' LICENSE.out',
518-
' sed -i \'s/Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura/\* MT19937 <http:\/\/www.math.sci.hiroshima-u.ac.jp\/~m-mat\/MT\/MT2002\/CODES\/mt19937ar.c>\n\nCopyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura/\' LICENSE.out',
517+
' sed -i \'s/Copyright (c) 2015: Dahua Lin./\\* StatsFuns.jl <https:\\/\\/raw.githubusercontent.com\\/JuliaStats\\/StatsFuns.jl\\/\ne66dd973650c375bc1739c820e5b96bb5bd000a8\\/LICENSE.md>\n\nCopyright (c) 2015: Dahua Lin./\' LICENSE.out',
518+
' sed -i \'s/Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura/\\* MT19937 <http:\\/\\/www.math.sci.hiroshima-u.ac.jp\\/~m-mat\\/MT\\/MT2002\\/CODES\\/mt19937ar.c>\n\nCopyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura/\' LICENSE.out',
519519
'',
520520
'# Move LICENSE.out to LICENSE:',
521521
'mv LICENSE.out '+dist+'LICENSE',

0 commit comments

Comments
 (0)