diff options
author | Malte Brandy <malte.brandy@maralorn.de> | 2021-07-31 12:55:16 +0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-07-31 13:34:20 +0200 |
commit | ce28b01ea34c346d697348b6082c90c0b9613ede (patch) | |
tree | 5fed60716579f876aa6435c6c85cb75d20dea591 /maintainers | |
parent | b8310591cbd60d54883a07f5063fc15b6b263c4e (diff) | |
download | nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.tar nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.tar.gz nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.tar.bz2 nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.tar.lz nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.tar.xz nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.tar.zst nixpkgs-ce28b01ea34c346d697348b6082c90c0b9613ede.zip |
maintainers/haskell/package-list: Only read one line from password-cmd
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh index c49ea68fbfb..9e243052f25 100755 --- a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh +++ b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh @@ -12,10 +12,10 @@ # ~/.cabal/config file. # e.g. username: maralorn -# password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression.) +# password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression. Like cabal we only read the first output line and ignore the rest.) # Those fields are specified under `upload` on the `cabal` man page. package_list="$(nix-build -A haskell.package-list)/nixos-hackage-packages.csv" username=$(grep "^username:" ~/.cabal/config | sed "s/^username: //") password_command=$(grep "^password-command:" ~/.cabal/config | sed "s/^password-command: //") -curl -u "$username:$($password_command)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv +curl -u "$username:$($password_command | head -n1)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv |