wgetの標準出力からディレクトリを抽出する

wgetの標準出力からディレクトリを抽出する

wgetgithub.comからtarballをインポートして、一時ファイルを作成せずにサブディレクトリを抽出しようとしています。


wget -qO- https://github.com/django-nonrel/django-nonrel/tarball/develop | tar xzf - django

エラーが発生します。


tar: django: Not found in archive
tar: Exiting with failure status due to previous errors

明らかに私は何か間違っています。

ベストアンサー1

--strip-components=1djangoディレクトリ自体は作成されたgzipコンテンツのサブディレクトリなので、GNU tarオプションを使用する必要があります。 GNU tarを使用するとします。次に、tarに名前付きサブディレクトリを探していることを知らせる必要がありますdjango

wget -qO- https://github.com/django-nonrel/django-nonrel/tarball/develop | tar --strip-components=1 -zxf - \*/django

FWIW、私も--no-check-certificate使用する必要がありますwget

おすすめ記事