From 30c53e395853f5bfe805a1e429fcf26666eed8f8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 17 May 2018 22:49:47 +0100 Subject: gentoo resync : 17.05.2018 --- net-p2p/Manifest.gz | Bin 9427 -> 9424 bytes net-p2p/go-ipfs-bin/Manifest | 11 +- net-p2p/go-ipfs-bin/files/ipfs-completion.bash | 959 ----------------------- net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13-r1.ebuild | 28 - net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13.ebuild | 24 - net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.15.ebuild | 29 + 6 files changed, 34 insertions(+), 1017 deletions(-) delete mode 100644 net-p2p/go-ipfs-bin/files/ipfs-completion.bash delete mode 100644 net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13-r1.ebuild delete mode 100644 net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13.ebuild create mode 100644 net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.15.ebuild (limited to 'net-p2p') diff --git a/net-p2p/Manifest.gz b/net-p2p/Manifest.gz index 92bd96e1fb02..1c159836e70b 100644 Binary files a/net-p2p/Manifest.gz and b/net-p2p/Manifest.gz differ diff --git a/net-p2p/go-ipfs-bin/Manifest b/net-p2p/go-ipfs-bin/Manifest index 8a469681a527..1207d392babb 100644 --- a/net-p2p/go-ipfs-bin/Manifest +++ b/net-p2p/go-ipfs-bin/Manifest @@ -1,12 +1,11 @@ -AUX ipfs-completion.bash 20856 BLAKE2B 60370fabf7dee1f157c242fef5709b486428db4dde24388fca1a21655b44e9cbd07a523af05c66f70e8a7ac43a40cb4a439faaae856bfe52c74853e7539b4f3e SHA512 17568f42a0980734e57a6c22bab4bac149719ab4d586a5a477f4b11610c2c982c1b5c395b9244c73aa95c82bd40688b8368960bfc0fd5db2e6139660d38e6c9a DIST go-ipfs-bin-0.4.14.bash 20856 BLAKE2B 60370fabf7dee1f157c242fef5709b486428db4dde24388fca1a21655b44e9cbd07a523af05c66f70e8a7ac43a40cb4a439faaae856bfe52c74853e7539b4f3e SHA512 17568f42a0980734e57a6c22bab4bac149719ab4d586a5a477f4b11610c2c982c1b5c395b9244c73aa95c82bd40688b8368960bfc0fd5db2e6139660d38e6c9a -DIST go-ipfs_v0.4.13_linux-386.tar.gz 10092376 BLAKE2B 244d964402162d6de667e8c8b51a8a05f230916dc6048b5fd9b71b9776f26e775791eb80c3e02c7c6e730bf77fa6828cc7067e6070877e716d7e63439f481e36 SHA512 4d0c54e094a0566be8dec1dae5f99264dcf039d92a6f757b6e95b98b1d60f35d6a226a130b02ff2be74875f8d6e283e8535666a011b6c940b91f0fe0c03b8d24 -DIST go-ipfs_v0.4.13_linux-amd64.tar.gz 12635297 BLAKE2B 984dc455668fc9c5cd3b301978b0639f1c2dcb22e6091d351d6ff021aca427ae06801ab814eb497ce6b597f8fcdbcdd7f8764334220ae1dcacda4ce2d9a314ae SHA512 b1c8a8ed5f9857f421dd1dc082492a39dc517b6306184762b3161af0c81f22d9e17720a4a459e94f369a6c0664da37f0516b1cea07ca742d9dd4305537e416b2 -DIST go-ipfs_v0.4.13_linux-arm.tar.gz 9925178 BLAKE2B 735534b278838a9ea25a6d379ffa6834c2710c61901870924f60fd6849b6320271dc5af263e58140096f3dff1d0d50a8f1835364889cd4e1b3a16383ec2b5599 SHA512 2152c4d132ab753c50fc8c5f3726066d5f0d490db02f2dc344c2414cd3ea93daa88f75d38e92a33aa036fa49ac97e615320a690d7680f6a3c86604a6cd0f00cb +DIST go-ipfs-bin-0.4.15.bash 20856 BLAKE2B 60370fabf7dee1f157c242fef5709b486428db4dde24388fca1a21655b44e9cbd07a523af05c66f70e8a7ac43a40cb4a439faaae856bfe52c74853e7539b4f3e SHA512 17568f42a0980734e57a6c22bab4bac149719ab4d586a5a477f4b11610c2c982c1b5c395b9244c73aa95c82bd40688b8368960bfc0fd5db2e6139660d38e6c9a DIST go-ipfs_v0.4.14_linux-386.tar.gz 8199245 BLAKE2B 950daceb417126203b803e512a41c004118990a981ead1f4dcc09185994be17d2c0899627f0a3cbb99e20a1e003d704e9bee6ce405dfd992a1871f3cdbc324b7 SHA512 bb2f88f6409adbe79a543bdde8d758a7e0f043b044aac42886fe9f2a973cf3477ef333df52103673aa93dfddc71946cad99021df813a9425f42599ee1ce70270 DIST go-ipfs_v0.4.14_linux-amd64.tar.gz 10218138 BLAKE2B 10269581a8325172e5a5cebd64a760289864850703e62dc7e29a330d946d51b0b3ce2631a19fe9c7ea32f2eebb2b34a2bdb2682ac86a78bcf87a012d97bf5585 SHA512 71269aca8350e67a70faf7c16d2d7f9885d2e46a5af7cd737d888369d4a231e06ac8b4bebac43eda54c39b8cf345c80fbbc15fd227f0923f8381b3b0720fccb8 DIST go-ipfs_v0.4.14_linux-arm.tar.gz 8136810 BLAKE2B 4fc6b52fec544cdd0c33ca31dd520821bbba2f8fab2b90994cd092de7ea7a132db4acdad80c2929df11b2e0d36d040efdd1708db5b1c3f05b89dadf60974544e SHA512 d87b5072aab2e3c00c8028f69042dea53523ba43eae01257b6fd25b9f5dc43aa09474368496da40bd62f99f63cc53c9786ce6babae08016d86ec8030c8c06b27 -EBUILD go-ipfs-bin-0.4.13-r1.ebuild 707 BLAKE2B 121a225c404e706bff06480a462e0d3c3ca06c16ef01d1d6a2454bd343128b06f803fb28f756fbce526d53815c2198958fabd2cc33a9ec3040741787509822bd SHA512 a8193353969b072b981f4e48c37c0dd508e819f7695642a1f0e234fdc6a027d6a5a084c5c6ed8b9995dbc3562b39469fbe05606d6a49afb11ceeb23c168a87d2 -EBUILD go-ipfs-bin-0.4.13.ebuild 622 BLAKE2B 3a96e4a92021ce22bb11062688a622cd288b9f995667a1214b1286003ec0cd37227c7afa61b90175bea88ede4dcfdff494e7bca92ac7e0b5a2042280d590c278 SHA512 2df6bc398734e8129c68143cbdaf1b4840a5265dff96b47b100655b4009a3a62edd9fd936a84aaf1328d8f0781d73f0211842df7ee91f79250a4543990f572f0 +DIST go-ipfs_v0.4.15_linux-386.tar.gz 8189548 BLAKE2B 6f82260f92b55d863189ad6f0cdeff4972df863953d132cbb11623e06c33b154e650e9fd0bd03d4a3f8477cce22447603a0207f0afc6eed074fcf7d05ead01af SHA512 11b4f11da0754819456dc7b5d149d72670582cd3e9c90b518546024356857c49a9a97ebebf1bc495e48e4bde96884e58f979a51fc57993bdff0509bccc6fad31 +DIST go-ipfs_v0.4.15_linux-amd64.tar.gz 10209630 BLAKE2B ce6fec2968765ac54f1376f0e8f9f3728338b06104a4b841b7993b5955f889e62e0bcf4e79fe6e180ef2e6cb4e9b07745935aaea74d7d6a050b7484e6d6ba9be SHA512 d77790c5c58f49229989b0e08fa537bc084bf9e2953479e307557e96924f96b913f00c4a7a76c687f2db63f098a18a575f34d88a3f226e7933039e8d8910dd10 +DIST go-ipfs_v0.4.15_linux-arm.tar.gz 8124892 BLAKE2B 8f3ab08f83ca7c4067a230fc0557393f107a08d1df069fd2029393cc1320d5cf678316e988472696aeceadea2d4f04e8c0bb85526284627c1d9e5f0acb2cc3e7 SHA512 4e98fda84d0f8c1e118150771b03a238cec96631d8ea798bf5c494f60711f1d272abe0830edfafb9f7fa6e246c59f30fe7896f231217f1b5aa2bdb6ccd3a94a5 EBUILD go-ipfs-bin-0.4.14.ebuild 795 BLAKE2B f095381ec82d12277234f86342b3171e4cc6a15034293ea147a383f077b90d252f4952e0e9e9f33058aba7ea3dc7289177d4f14ebd0a8e93c14383c72ff4cc57 SHA512 afb45caddf2511d8afff6d774fd82d10ac9dd829316a9e26cb7e8e7c0a5890cc3dd751a2eccb6b2cd8bd3de2bbf02a0dfe2919664ee0364960f023d78540032a +EBUILD go-ipfs-bin-0.4.15.ebuild 772 BLAKE2B 764b2f58ddd2c3fea8955a1bc76aa6c5189d4a1f826b71d8b5684755db3815c4ca908c3237fd9bf7ad10b1f083109b6d92204d4818dc165ca22bcaf816a6626b SHA512 1c7ab86d2ee7f6acdcdccb679b5253dd7ee08c965a0777bc735cbbd215cc03a6ad67cf1395688d63d514761518bb0e24112d51e964403a658717e4e31b1313db MISC metadata.xml 606 BLAKE2B a6db8a5d8f57434206cbe3a8d69a3734381fdc2f13c2dd17596f2dd69fce52deca63717920ef0ff8f861451465f4702f967dbe1790916898000c7eeb858604a3 SHA512 3c0ae2eeeb423edc50a5961f9e9f040b33c0a343e77b47dafc1699eea65708df2365944338da691a637ea79680976dfc91346e6572c42cae94a429c0902c8065 diff --git a/net-p2p/go-ipfs-bin/files/ipfs-completion.bash b/net-p2p/go-ipfs-bin/files/ipfs-completion.bash deleted file mode 100644 index 27f83fdef68b..000000000000 --- a/net-p2p/go-ipfs-bin/files/ipfs-completion.bash +++ /dev/null @@ -1,959 +0,0 @@ -_ipfs_comp() -{ - COMPREPLY=( $(compgen -W "$1" -- ${word}) ) - if [[ ${#COMPREPLY[@]} == 1 && ${COMPREPLY[0]} == "--"*"=" ]] ; then - # If there's only one option, with =, then discard space - compopt -o nospace - fi -} - -_ipfs_help_only() -{ - _ipfs_comp "--help" -} - -_ipfs_add() -{ - if [[ "${prev}" == "--chunker" ]] ; then - _ipfs_comp "placeholder1 placeholder2 placeholder3" # TODO: a) Give real options, b) Solve autocomplete bug for "=" - elif [ "${prev}" == "--pin" ] ; then - _ipfs_comp "true false" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --quiet --silent --progress --trickle --only-hash --wrap-with-directory --hidden --chunker= --pin= --raw-leaves --help " - else - _ipfs_filesystem_complete - fi -} - -_ipfs_bitswap() -{ - ipfs_comp "ledger stat unwant wantlist --help" -} - -_ipfs_bitswap_ledger() -{ - _ipfs_help_only -} - -_ipfs_bitswap_stat() -{ - _ipfs_help_only -} - -_ipfs_bitswap_unwant() -{ - _ipfs_help_only -} - -_ipfs_bitswap_wantlist() -{ - ipfs_comp "--peer= --help" -} - -_ipfs_bitswap_unwant() -{ - _ipfs_help_only -} - -_ipfs_block() -{ - _ipfs_comp "get put rm stat --help" -} - -_ipfs_block_get() -{ - _ipfs_hash_complete -} - -_ipfs_block_put() -{ - if [ "${prev}" == "--format" ] ; then - _ipfs_comp "v0 placeholder2 placeholder3" # TODO: a) Give real options, b) Solve autocomplete bug for "=" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--format= --help" - else - _ipfs_filesystem_complete - fi -} - -_ipfs_block_rm() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--force --quiet --help" - else - _ipfs_hash_complete - fi -} - -_ipfs_block_stat() -{ - _ipfs_hash_complete -} - -_ipfs_bootstrap() -{ - _ipfs_comp "add list rm --help" -} - -_ipfs_bootstrap_add() -{ - _ipfs_comp "default --help" -} - -_ipfs_bootstrap_list() -{ - _ipfs_help_only -} - -_ipfs_bootstrap_rm() -{ - _ipfs_comp "all --help" -} - -_ipfs_cat() -{ - if [[ ${prev} == */* ]] ; then - COMPREPLY=() # Only one argument allowed - elif [[ ${word} == */* ]] ; then - _ipfs_hash_complete - else - _ipfs_pinned_complete - fi -} - -_ipfs_commands() -{ - _ipfs_comp "--flags --help" -} - -_ipfs_config() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--bool --json" - elif [[ ${prev} == *.* ]] ; then - COMPREPLY=() # Only one subheader of the config can be shown or edited. - else - _ipfs_comp "show edit replace" - fi -} - -_ipfs_config_edit() -{ - _ipfs_help_only -} - -_ipfs_config_replace() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--help" - else - _ipfs_filesystem_complete - fi -} - -_ipfs_config_show() -{ - _ipfs_help_only -} - -_ipfs_daemon() -{ - if [[ ${prev} == "--routing" ]] ; then - _ipfs_comp "dht dhtclient none" # TODO: Solve autocomplete bug for "=" - elif [[ ${prev} == "--mount-ipfs" ]] || [[ ${prev} == "--mount-ipns" ]] || [[ ${prev} == "=" ]]; then - _ipfs_filesystem_complete - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--init --routing= --mount --writable --mount-ipfs= \ - --mount-ipns= --unrestricted-api --disable-transport-encryption \ - -- enable-gc --manage-fdlimit --offline --migrate --help" - fi -} - -_ipfs_dag() -{ - _ipfs_comp "get put --help" -} - -_ipfs_dag_get() -{ - _ipfs_help_only -} - -_ipfs_dag_put() -{ - if [[ ${prev} == "--format" ]] ; then - _ipfs_comp "cbor placeholder1" # TODO: a) Which format more then cbor is valid? b) Solve autocomplete bug for "=" - elif [[ ${prev} == "--input-enc" ]] ; then - _ipfs_comp "json placeholder1" # TODO: a) Which format more then json is valid? b) Solve autocomplete bug for "=" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--format= --input-enc= --help" - else - _ipfs_filesystem_complete - fi -} - -_ipfs_dht() -{ - _ipfs_comp "findpeer findprovs get provide put query --help" -} - -_ipfs_dht_findpeer() -{ - _ipfs_comp "--verbose --help" -} - -_ipfs_dht_findprovs() -{ - _ipfs_comp "--verbose --help" -} - -_ipfs_dht_get() -{ - _ipfs_comp "--verbose --help" -} - -_ipfs_dht_provide() -{ - _ipfs_comp "--recursive --verbose --help" -} - -_ipfs_dht_put() -{ - _ipfs_comp "--verbose --help" -} - -_ipfs_dht_query() -{ - _ipfs_comp "--verbose --help" -} - -_ipfs_diag() -{ - _ipfs_comp "sys cmds net --help" -} - -_ipfs_diag_cmds() -{ - if [[ ${prev} == "clear" ]] ; then - return 0 - elif [[ ${prev} =~ ^-?[0-9]+$ ]] ; then - _ipfs_comp "ns us µs ms s m h" # TODO: Trigger with out space, eg. "ipfs diag set-time 10ns" not "... set-time 10 ns" - elif [[ ${prev} == "set-time" ]] ; then - _ipfs_help_only - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--verbose --help" - else - _ipfs_comp "clear set-time" - fi -} - -_ipfs_diag_sys() -{ - _ipfs_help_only -} - -_ipfs_diag_net() -{ - if [[ ${prev} == "--vis" ]] ; then - _ipfs_comp "d3 dot text" # TODO: Solve autocomplete bug for "=" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--timeout= --vis= --help" - fi -} - -_ipfs_dns() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --help" - fi -} - -_ipfs_files() -{ - _ipfs_comp "mv rm flush read write cp ls mkdir stat" -} - -_ipfs_files_mv() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --flush" - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_rm() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --flush" - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} -_ipfs_files_flush() -{ - if [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_read() -{ - if [[ ${prev} == "--count" ]] || [[ ${prev} == "--offset" ]] ; then - COMPREPLY=() # Numbers, just keep it empty - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--offset --count --help" - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_write() -{ - if [[ ${prev} == "--count" ]] || [[ ${prev} == "--offset" ]] ; then # Dirty check - COMPREPLY=() # Numbers, just keep it empty - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--offset --count --create --truncate --help" - elif [[ ${prev} == /* ]] ; then - _ipfs_filesystem_complete - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_cp() -{ - if [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_ls() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "-l --help" - elif [[ ${prev} == /* ]] ; then - COMPREPLY=() # Path exist - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_mkdir() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--parents --help" - - elif [[ ${prev} == /* ]] ; then - COMPREPLY=() # Path exist - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_files_stat() -{ - if [[ ${prev} == /* ]] ; then - COMPREPLY=() # Path exist - elif [[ ${word} == /* ]] ; then - _ipfs_files_complete - else - COMPREPLY=( / ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_file() -{ - if [[ ${prev} == "ls" ]] ; then - _ipfs_hash_complete - else - _ipfs_comp "ls --help" - fi -} - -_ipfs_file_ls() -{ - _ipfs_help_only -} - -_ipfs_get() -{ - if [ "${prev}" == "--output" ] ; then - compopt -o default # Re-enable default file read - COMPREPLY=() - elif [ "${prev}" == "--compression-level" ] ; then - _ipfs_comp "-1 1 2 3 4 5 6 7 8 9" # TODO: Solve autocomplete bug for "=" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--output= --archive --compress --compression-level= --help" - else - _ipfs_hash_complete - fi -} - -_ipfs_id() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--format= --help" - fi -} - -_ipfs_init() -{ - _ipfs_comp "--bits --force --empty-repo --help" -} - -_ipfs_log() -{ - _ipfs_comp "level ls tail --help" -} - -_ipfs_log_level() -{ - # TODO: auto-complete subsystem and level - _ipfs_help_only -} - -_ipfs_log_ls() -{ - _ipfs_help_only -} - -_ipfs_log_tail() -{ - _ipfs_help_only -} - -_ipfs_ls() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--headers --resolve-type=false --help" - else - _ipfs_hash_complete - fi -} - -_ipfs_mount() -{ - if [[ ${prev} == "--ipfs-path" ]] || [[ ${prev} == "--ipns-path" ]] || [[ ${prev} == "=" ]] ; then - _ipfs_filesystem_complete - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--ipfs-path= --ipns-path= --help" - fi -} - -_ipfs_name() -{ - _ipfs_comp "publish resolve --help" -} - -_ipfs_name_publish() -{ - if [[ ${prev} == "--lifetime" ]] || [[ ${prev} == "--ttl" ]] ; then - COMPREPLY=() # Accept only numbers - elif [[ ${prev} =~ ^-?[0-9]+$ ]] ; then - _ipfs_comp "ns us µs ms s m h" # TODO: Trigger without space, eg. "ipfs diag set-time 10ns" not "... set-time 10 ns" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--resolve --lifetime --ttl --help" - elif [[ ${word} == */ ]]; then - _ipfs_hash_complete - else - _ipfs_pinned_complete - fi -} - -_ipfs_name_resolve() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --nocache --help" - fi -} - -_ipfs_object() -{ - _ipfs_comp "data diff get links new patch put stat --help" -} - -_ipfs_object_data() -{ - _ipfs_hash_complete -} - -_ipfs_object_diff() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--verbose --help" - else - _ipfs_hash_complete - fi -} - - -_ipfs_object_get() -{ - if [ "${prev}" == "--encoding" ] ; then - _ipfs_comp "protobuf json xml" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--encoding --help" - else - _ipfs_hash_complete - fi -} - -_ipfs_object_links() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--headers --help" - else - _ipfs_hash_complete - fi -} - -_ipfs_object_new() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--help" - else - _ipfs_comp "unixfs-dir" - fi -} - -_ipfs_object_patch() -{ - if [[ -n "${COMP_WORDS[3]}" ]] ; then # Root merkledag object exist - case "${COMP_WORDS[4]}" in - append-data) - _ipfs_help_only - ;; - add-link) - if [[ ${word} == -* ]] && [[ ${prev} == "add-link" ]] ; then # Dirty check - _ipfs_comp "--create" - #else - # TODO: Hash path autocomplete. This is tricky, can be hash or a name. - fi - ;; - rm-link) - _ipfs_hash_complete - ;; - set-data) - _ipfs_filesystem_complete - ;; - *) - _ipfs_comp "append-data add-link rm-link set-data" - ;; - esac - else - _ipfs_hash_complete - fi -} - -_ipfs_object_put() -{ - if [ "${prev}" == "--inputenc" ] ; then - _ipfs_comp "protobuf json" - elif [ "${prev}" == "--datafieldenc" ] ; then - _ipfs_comp "text base64" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--inputenc --datafieldenc --help" - else - _ipfs_hash_complete - fi -} - -_ipfs_object_stat() -{ - _ipfs_hash_complete -} - -_ipfs_pin() -{ - _ipfs_comp "rm ls add --help" -} - -_ipfs_pin_add() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive= --help" - elif [[ ${word} == */ ]] && [[ ${word} != "/ipfs/" ]] ; then - _ipfs_hash_complete - fi -} - -_ipfs_pin_ls() -{ - if [[ ${prev} == "--type" ]] || [[ ${prev} == "-t" ]] ; then - _ipfs_comp "direct indirect recursive all" # TODO: Solve autocomplete bug for - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--count --quiet --type= --help" - elif [[ ${word} == */ ]] && [[ ${word} != "/ipfs/" ]] ; then - _ipfs_hash_complete - fi -} - -_ipfs_pin_rm() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --help" - elif [[ ${word} == */ ]] && [[ ${word} != "/ipfs/" ]] ; then - COMPREPLY=() # TODO: _ipfs_hash_complete() + List local pinned hashes as default? - fi -} - -_ipfs_ping() -{ - _ipfs_comp "--count= --help" -} - -_ipfs_pubsub() -{ - _ipfs_comp "ls peers pub sub --help" -} - -_ipfs_pubsub_ls() -{ - _ipfs_help_only -} - -_ipfs_pubsub_peers() -{ - _ipfs_help_only -} - -_ipfs_pubsub_pub() -{ - _ipfs_help_only -} - -_ipfs_pubsub_sub() -{ - _ipfs_comp "--discover --help" -} - -_ipfs_refs() -{ - if [ "${prev}" == "--format" ] ; then - _ipfs_comp "src dst linkname" - elif [[ ${word} == -* ]] ; then - _ipfs_comp "local --format= --edges --unique --recursive --help" - #else - # TODO: Use "ipfs ref" and combine it with autocomplete, see _ipfs_hash_complete - fi -} - -_ipfs_refs_local() -{ - _ipfs_help_only -} - -_ipfs_repo() -{ - _ipfs_comp "fsck gc stat verify version --help" -} - -_ipfs_repo_version() -{ - _ipfs_comp "--quiet --help" -} - -_ipfs_repo_verify() -{ - _ipfs_help_only -} - -_ipfs_repo_gc() -{ - _ipfs_comp "--quiet --help" -} - -_ipfs_repo_stat() -{ - _ipfs_comp "--human --help" -} - -_ipfs_repo_fsck() -{ - _ipfs_help_only -} - -_ipfs_resolve() -{ - if [[ ${word} == /ipfs/* ]] ; then - _ipfs_hash_complete - elif [[ ${word} == /ipns/* ]] ; then - COMPREPLY=() # Can't autocomplete ipns - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--recursive --help" - else - opts="/ipns/ /ipfs/" - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - [[ $COMPREPLY = */ ]] && compopt -o nospace - fi -} - -_ipfs_stats() -{ - _ipfs_comp "bitswap bw repo --help" -} - -_ipfs_stats_bitswap() -{ - _ipfs_help_only -} - -_ipfs_stats_bw() -{ - # TODO: Which protocol is valid? - _ipfs_comp "--peer= --proto= --poll --interval= --help" -} - -_ipfs_stats_repo() -{ - _ipfs_comp "--human= --help" -} - -_ipfs_swarm() -{ - _ipfs_comp "addrs connect disconnect filters peers --help" -} - -_ipfs_swarm_addrs() -{ - _ipfs_comp "local --help" -} - -_ipfs_swarm_addrs_local() -{ - _ipfs_comp "--id --help" -} - -_ipfs_swarm_connect() -{ - _ipfs_multiaddr_complete -} - -_ipfs_swarm_disconnect() -{ - local OLDIFS="$IFS" ; local IFS=$'\n' # Change divider for iterator one line below - opts=$(for x in `ipfs swarm peers`; do echo ${x} ; done) - IFS="$OLDIFS" # Reset divider to space, ' ' - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - [[ $COMPREPLY = */ ]] && compopt -o nospace -o filenames -} - -_ipfs_swarm_filters() -{ - if [[ ${prev} == "add" ]] || [[ ${prev} == "rm" ]]; then - _ipfs_multiaddr_complete - else - _ipfs_comp "add rm --help" - fi -} - -_ipfs_swarm_filters_add() -{ - _ipfs_help_only -} - -_ipfs_swarm_filters_rm() -{ - _ipfs_help_only -} - -_ipfs_swarm_peers() -{ - _ipfs_help_only -} - -_ipfs_tar() -{ - _ipfs_comp "add cat --help" -} - -_ipfs_tar_add() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--help" - else - _ipfs_filesystem_complete - fi -} - -_ipfs_tar_cat() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--help" - else - _ipfs_filesystem_complete - fi -} - -_ipfs_update() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--version" # TODO: How does "--verbose" option work? - else - _ipfs_comp "versions version install stash revert fetch" - fi -} - -_ipfs_update_install() -{ - if [[ ${prev} == v*.*.* ]] ; then - COMPREPLY=() - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--version" - else - local OLDIFS="$IFS" ; local IFS=$'\n' # Change divider for iterator one line below - opts=$(for x in `ipfs update versions`; do echo ${x} ; done) - IFS="$OLDIFS" # Reset divider to space, ' ' - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - fi -} - -_ipfs_update_stash() -{ - if [[ ${word} == -* ]] ; then - _ipfs_comp "--tag --help" - fi -} -_ipfs_update_fetch() -{ - if [[ ${prev} == "--output" ]] ; then - _ipfs_filesystem_complete - elif [[ ${word} == -* ]] ; then - _ipfs_comp "--output --help" - fi -} - -_ipfs_version() -{ - _ipfs_comp "--number --commit --repo" -} - -_ipfs_hash_complete() -{ - local lastDir=${word%/*}/ - echo "LastDir: ${lastDir}" >> ~/Downloads/debug-ipfs.txt - local OLDIFS="$IFS" ; local IFS=$'\n' # Change divider for iterator one line below - opts=$(for x in `ipfs file ls ${lastDir}`; do echo ${lastDir}${x}/ ; done) # TODO: Implement "ipfs file ls -F" to get rid of frontslash after files. This take long time to run first time on a new shell. - echo "Options: ${opts}" >> ~/Downloads/debug-ipfs.txt - IFS="$OLDIFS" # Reset divider to space, ' ' - echo "Current: ${word}" >> ~/Downloads/debug-ipfs.txt - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - echo "Suggestion: ${COMPREPLY}" >> ~/Downloads/debug-ipfs.txt - [[ $COMPREPLY = */ ]] && compopt -o nospace -o filenames # Removing whitespace after output & handle output as filenames. (Only printing the latest folder of files.) - return 0 -} - -_ipfs_files_complete() -{ - local lastDir=${word%/*}/ - local OLDIFS="$IFS" ; local IFS=$'\n' # Change divider for iterator one line below - opts=$(for x in `ipfs files ls ${lastDir}`; do echo ${lastDir}${x}/ ; done) # TODO: Implement "ipfs files ls -F" to get rid of frontslash after files. This does currently throw "Error: /cats/foo/ is not a directory" - IFS="$OLDIFS" # Reset divider to space, ' ' - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - [[ $COMPREPLY = */ ]] && compopt -o nospace -o filenames - return 0 -} - -_ipfs_multiaddr_complete() -{ - local lastDir=${word%/*}/ - # Special case - if [[ ${word} == */"ipcidr"* ]] ; then # TODO: Broken, fix it. - opts="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32" # TODO: IPv6? - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - # "Loop" - elif [[ ${word} == /*/ ]] || [[ ${word} == /*/* ]] ; then - if [[ ${word} == /*/*/*/*/*/ ]] ; then - COMPREPLY=() - elif [[ ${word} == /*/*/*/*/ ]] ; then - word=${word##*/} - opts="ipfs/ " - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - elif [[ ${word} == /*/*/*/ ]] ; then - word=${word##*/} - opts="4001/ " - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - elif [[ ${word} == /*/*/ ]] ; then - word=${word##*/} - opts="udp/ tcp/ ipcidr/" - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - elif [[ ${word} == /*/ ]] ; then - COMPREPLY=() # TODO: This need to return something to NOT break the function. Maybe a "/" in the end as well due to -o filename option. - fi - COMPREPLY=${lastDir}${COMPREPLY} - else # start case - opts="/ip4/ /ip6/" - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) ) - fi - [[ $COMPREPLY = */ ]] && compopt -o nospace -o filenames - return 0 -} - -_ipfs_pinned_complete() -{ - local OLDIFS="$IFS" ; local IFS=$'\n' - local pinned=$(ipfs pin ls) - COMPREPLY=( $(compgen -W "${pinned}" -- ${word}) ) - IFS="$OLDIFS" - if [[ ${#COMPREPLY[*]} -eq 1 ]]; then # Only one completion, remove pretty output - COMPREPLY=( ${COMPREPLY[0]/ *//} ) #Remove ' ' and everything after - [[ $COMPREPLY = */ ]] && compopt -o nospace # Removing whitespace after output - fi -} -_ipfs_filesystem_complete() -{ - compopt -o default # Re-enable default file read - COMPREPLY=() -} - -_ipfs() -{ - COMPREPLY=() - compopt +o default # Disable default to not deny completion, see: http://stackoverflow.com/a/19062943/1216348 - - local word="${COMP_WORDS[COMP_CWORD]}" - local prev="${COMP_WORDS[COMP_CWORD-1]}" - - case "${COMP_CWORD}" in - 1) - local opts="add bitswap block bootstrap cat commands config daemon dag dht \ - diag dns file files get id init log ls mount name object pin ping pubsub \ - refs repo resolve stats swarm tar update version" - COMPREPLY=( $(compgen -W "${opts}" -- ${word}) );; - 2) - local command="${COMP_WORDS[1]}" - eval "_ipfs_$command" 2> /dev/null ;; - *) - local command="${COMP_WORDS[1]}" - local subcommand="${COMP_WORDS[2]}" - eval "_ipfs_${command}_${subcommand}" 2> /dev/null && return - eval "_ipfs_$command" 2> /dev/null ;; - esac -} -complete -F _ipfs ipfs diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13-r1.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13-r1.ebuild deleted file mode 100644 index 2383025e0dc5..000000000000 --- a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13-r1.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit bash-completion-r1 - -DESCRIPTION="The main implementation of IPFS." -HOMEPAGE="https://ipfs.io/" -SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz ) - x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz ) - arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz )" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="-* ~amd64 ~arm ~x86" -IUSE="+fuse" - -RDEPEND="fuse? ( sys-fs/fuse )" -S="${WORKDIR}/go-ipfs" - -QA_PREBUILT="/usr/bin/ipfs" - -src_install() { - dobin ipfs - - newbashcomp "${FILESDIR}/ipfs-completion.bash" "${PN}" -} diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13.ebuild deleted file mode 100644 index b066411259af..000000000000 --- a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.13.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="The main implementation of IPFS." -HOMEPAGE="https://ipfs.io/" -SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz ) - x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz ) - arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz )" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="-* ~amd64 ~arm ~x86" -IUSE="+fuse" - -RDEPEND="fuse? ( sys-fs/fuse )" -S="${WORKDIR}/go-ipfs" - -QA_PREBUILT="/usr/bin/ipfs" - -src_install() { - dobin ipfs -} diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.15.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.15.ebuild new file mode 100644 index 000000000000..c810e8c42f96 --- /dev/null +++ b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.15.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit bash-completion-r1 + +DESCRIPTION="Main implementation of IPFS" +HOMEPAGE="https://ipfs.io/" +SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz ) + x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz ) + arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz ) + + https://raw.githubusercontent.com/ipfs/go-ipfs/v${PV}/misc/completion/ipfs-completion.bash -> ${P}.bash" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~x86" + +RDEPEND="sys-fs/fuse" +S="${WORKDIR}/go-ipfs" + +QA_PREBUILT="/usr/bin/ipfs" + +src_install() { + dobin ipfs + + newbashcomp "${DISTDIR}/${P}.bash" "ipfs" +} -- cgit v1.2.3