logo

widrop

[mirror] WiDrop distribution, now defunct git clone https://hacktivis.me/git/mirror/widrop.git

build.sh (1296B)


  1. #!/bin/bash
  2. path=~/.widrop-gpg
  3. echo path=$path
  4. [[ ! -d $path ]] && (
  5. echo ----------------------------------------
  6. echo [Widrop]: Creating the dir $path
  7. echo ----------------------------------------
  8. mkdir $path
  9. chmod 700 $path
  10. )
  11. [[ ! -f $path/pubring.gpg || ! -f $path/secring.gpg ]] && (
  12. echo ----------------------------------------
  13. echo [Widrop]: Creating gpg keys
  14. echo ----------------------------------------
  15. gpg --homedir $path --gen-key
  16. key=$(gpg --homedir ~/.widrop-gpg --list-keys 2>/dev/null | grep pub | awk '{print $2}' | awk -F"/" '{print $2}')
  17. echo ----------------------------------------
  18. echo [Widrop]: key $key generated
  19. echo [Widrop]: Creating revocation key
  20. echo ----------------------------------------
  21. gpg --homedir $path --armor --output $path/revoke.gpg --gen-revoke $key
  22. echo ----------------------------------------
  23. echo [Widrop]: Exporting public key
  24. echo ----------------------------------------
  25. gpg --homedir $path --export -armor --output $path/pubkey.gpg
  26. cp $p ath/pubkey.gpg dist/
  27. echo ----------------------------------------
  28. echo [Widrop]: done
  29. echo [Widrop]: keyring stored in $path
  30. echo [Widrop]: pubkey available in dist/pubkey.gpg
  31. echo [Widrop]: use ./sign.sh to sign packages
  32. echo ----------------------------------------
  33. )