Code Monkey home page Code Monkey logo

Comments (9)

 avatar commented on May 17, 2024
cd
echo "Installing..."
curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar x --strip-components 1 --exclude 'README.md' --exclude 'bootstrap.sh'
echo "Done"

from dotfiles.

mathiasbynens avatar mathiasbynens commented on May 17, 2024

@kitcambridge Much better, thanks!

from dotfiles.

 avatar commented on May 17, 2024

@mathiasbynens Sure! I've been trying to find a way to merge the two --exclude options, but tar doesn't seem to understand the {README.md,bootstrap.sh} syntax. Interestingly, unzip supports more advanced globbing and removing all leading directory names...but it doesn't support piping, so using the zipball won't work.

from dotfiles.

yangg avatar yangg commented on May 17, 2024
curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar xz --strip-components 1 --exclude={README.md,bootstrap.sh}

BTW: You can run the script without -z?

from dotfiles.

mathiasbynens avatar mathiasbynens commented on May 17, 2024

@yangg Thanks! It seems to work fine without the -z:

cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -x --strip-components 1 --exclude={README.md,bootstrap.sh}

@kitcambridge I thought brace expansion was a Bash-wide feature… Weird that --exclude={README.md,bootstrap.sh} works while --exclude="{README.md,bootstrap.sh}" doesn’t. Perhaps @janmoesen can explain?

from dotfiles.

janmoesen avatar janmoesen commented on May 17, 2024

Brace expansion only works for unquoted and unescaped braces:

$ echo {foo,bar}; echo \{foo,bar}; echo '{foo,bar}'; echo {foo,"bar{f,t}"};
foo bar
{foo,bar}
{foo,bar}
foo bar{f,t}

from dotfiles.

janmoesen avatar janmoesen commented on May 17, 2024

(As an aside, tar automatically decompresses gzipped and bzip2-compressed tarballs since I Don't Know When, But I Do Remember Having To Explicitly Use -j and -z. Maybe someone on Unix and Linux - Stack Exchange knows when that happened, and for which flavours of tar exactly.)

from dotfiles.

mathiasbynens avatar mathiasbynens commented on May 17, 2024

@janmoesen Thanks for clarifying! I’ll add the -z back in, just in case.

from dotfiles.

 avatar commented on May 17, 2024

@yangg, @janmoesen Thanks for the clarifications!

from dotfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.