Skip to content

Stop relying on non-standard rename in update.sh. #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmitshur opened this issue Feb 21, 2016 · 1 comment
Closed

Stop relying on non-standard rename in update.sh. #43

dmitshur opened this issue Feb 21, 2016 · 1 comment

Comments

@dmitshur
Copy link
Member

This is a smaller task extracted from #36:

  • It requires rename command, which can be acquired with brew install rename but if possible, it'd be better not to require it. It can be replaced with a < 50 line Go program inside the repo, that way no external dependencies are needed.

@dominikh also wrote about the downsides of relying on this command in #41 (comment):

rename isn't a standard POSIX tool, and different Linux distributions ship different tools (with entirely different interfaces) under that name. For example, on my system, rename looks like this: rename [options] expression replacement file..., and the patterns look like shell globs, not like regular expressions. On my system, your version of rename would be perl-rename.

This should probably be written with find -exec instead.

This issue is to track that.

dmitshur added a commit that referenced this issue Feb 21, 2016
It uses a temporary staging folder to perform the operations.

-	No longer require your GOROOT to be writeable.
-	No longer require your GOPATH list to contain no more than
	1 workspace.
-	It has no side-effects, for example, it no longer leaves the
	$GOPATH/bin/playground.js.map file behind.

Fixes #36.

It doesn't fix a part of #36, but a new issue #43 is created to track that.
@dominikh
Copy link
Member

find "$PKG" -name "*.a" -exec sh -c 'mv $0 $0.js' {} \;

dmitshur added a commit that referenced this issue Feb 21, 2016
A more standard and widely available alternative implementation created
by @dominikh in
#43 (comment).

Fixes #43.
dmitshur added a commit that referenced this issue Feb 21, 2016
A more standard and widely available alternative implementation created
by @dominikh in #43 (comment).

Fixes #43.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants