Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
4.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
3 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # Maintainer: Pekka Helenius <fincer89@hotmail.com>
  2. # Do we include server-specific files such as SSH timezone settings?
  3. server_environment=false
  4. if [[ $server_environment == "true" ]]; then
  5. pkgname=archtools-server
  6. pkgdesc="Useful scripts for Arch Linux (server)"
  7. conflicts=(archtools)
  8. else
  9. pkgname=archtools
  10. pkgdesc="Useful scripts for Arch Linux"
  11. conflicts=(archtools-server)
  12. fi
  13. pkgver=0.1
  14. pkgrel=1
  15. url="https://github.com/Fincer/archtools"
  16. arch=(any)
  17. license=(GPL)
  18. depends=(coreutils bash grep sed
  19. pacman # listpkg.sh, bininfo.sh, pkginfo.sh, buildpkg.sh, installlocal.sh, missinglibs.sh, nowner.sh, findpkg.sh, findinpkg.sh, pkgdeps.sh, pkgstr.sh, risks.sh, showpkg.sh
  20. perl # findpkg.sh, genmac.sh
  21. wget # getsource.sh
  22. file # nowner.sh
  23. which iputils 9base package-query # pkgdeps.sh (9base = read command) #mimetype TODO get rid of this dependency
  24. tar xz bzip2 unrar gzip unzip p7zip cabextract #extract.sh
  25. arch-audit bc # risks.sh
  26. glibc # missinglibs.sh
  27. util-linux # killprocess.sh (kill command)
  28. stderred # bash.custom LD_PRELOAD
  29. )
  30. makedepends=(git)
  31. source=(
  32. tputcolors.sh
  33. extract.sh
  34. findmatch.sh
  35. findpkg.sh
  36. findinpkg.sh
  37. genmac.sh
  38. getsource.sh # TODO: More implementation needed. See the file for details
  39. nowner.sh # TODO: More implementation needed. See the file for details
  40. pkgdeps.sh # TODO: More implementation needed. See the file for details
  41. pkgstr.sh
  42. archrisks.sh
  43. showpkg.sh
  44. deltmpfiles.sh
  45. missinglibs.sh
  46. installlocal.sh
  47. buildpkg.sh
  48. pkginfo.sh
  49. bininfo.sh
  50. listpkg.sh
  51. killprocess.sh
  52. rmpkgfiles.sh
  53. specialchars.sh
  54. whichcmd.sh
  55. killns.sh
  56. psns.sh
  57. bash.custom
  58. https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS)
  59. if [[ $server_environment == "true" ]]; then
  60. # for ssh_timezone.sh
  61. depends+=(geoip2-database mmdblookup systemd openssh bind-tools)
  62. source+=(ssh_timezone.sh)
  63. fi
  64. sha256sums=('f5455279ae48739b4ce16b10061e898f80cff0c9b24100f499015cae618fb8c6'
  65. '623b794a8a537649cc434b496dbf1f018aeea99f57f11d0719f80e495ca438b6'
  66. '568dba0eb0dfe1875980484fe473bbbd4397bdc04622f6177992ee75ca1b065f'
  67. 'ed4e06ceb5aff36ea66ce9de74f5ff2236ab2f92a9419d79d6fefe5a1b013859'
  68. '60d859fead290ba0c39502a21eb093aa63b384963bf83b60d93c2fcb74655ef6'
  69. 'a3cf8e77af8a49935c3e9a579354f761ab7ca8c2f94760012b9e23a196307f8f'
  70. '6783896c716045da0e38ae11ccaac491b6166b15ef9273118dcbe662b2eca97e'
  71. 'e25a0d8b425fd3f05414b6f1f6f5fce5832bb842691dad5aff4c7ac5aaa7a9fd'
  72. '28fe6983f144e41d57589fefac6d60b84ff3b0968cc4b274276b34802ff03dd0'
  73. '67d5627b20ec75d94cb89f9f193daa8a8018d1453d387e0306c0032f5a9b6b30'
  74. 'd1427a149f7092fd2ac8e0f81167f7c4eb6a318918f96b2d5301a8b750796c5d'
  75. 'abc140033891cc4564d71e8487f6cd1e54add761417cc772652542daf7352f44'
  76. '8b76a175d7cc767519d1e3519d1fd874cc19cc529e08a27138948f8a1907ac6a'
  77. '6886176293cb3ed131dd83e2ca3aa15f70c559e265534e195fa8848f2d02f659'
  78. 'ef4574de79c82d52a2cfb57cbf19419362ab702471bd71620e5893f426d150e2'
  79. 'ac761aa82d3a369a3f5335ad8f38af6cd00181cacf24737080e6d6ed6fff1b18'
  80. '63a7b50faba7963584519f2800205d853cc02d6386362c9efd9f61154e4c9ddb'
  81. 'aa0b96ff9f1ff51e1ea3634fa7e17cbffa565c5b2db79ed75bd6aeeb9de9a723'
  82. 'fc87bd14c0638cd3c803143c371946efe2c96a87d72d2c144fbaf29a815294d3'
  83. '4baf8c7d1032cafb8535dc4d53c42b7e7f2da6839bde791c31104a3f67eb845b'
  84. 'e179f9b18d6869558a97530101502ae6b445d3ef430e2e4359d015f214292093'
  85. '1aae9db8652179e18691fd51c687ab393672f380084e8777145572a5699bf5cf'
  86. '93ee0e990f36a5641e4f9fb4ba851e3db47ff6f01fdfad8dd169b83c546ecae9'
  87. '40fd211e7b4a21ca61be81a809ee47f58adc6cd220218a20a0c7e65e1534c6ca')
  88. package() {
  89. mkdir -p "$pkgdir"/{usr/bin,etc}
  90. #cp -R "$srcdir"/"$pkgname"/*.sh "$pkgdir"/usr/bin/
  91. install -m644 "$srcdir"/LS_COLORS "$pkgdir"/etc/dircolors
  92. install -m644 "$srcdir"/bash.custom "$pkgdir"/etc/bash.custom
  93. for sh in ./*.sh; do
  94. install -m755 $sh "$pkgdir"/usr/bin/
  95. #chmod u=rwx,g=rx,o=rx $sh
  96. mv "$pkgdir"/usr/bin/$sh $(echo "$pkgdir"/usr/bin/$sh | sed 's/\.sh//')
  97. done
  98. msg2 '
  99. In /etc/bash.bashrc file, replace line
  100. PS1="[\\u@\\h \\W]\\$ "
  101. with
  102. [[ -f /etc/bash.custom ]] && . /etc/bash.custom || PS1="[\\u@\\h \\W]\\$ "
  103. After that, you can change bash settings globally by editing /etc/bash.custom file
  104. '
  105. #msg2 "You can change bash settings globally by editing /etc/bash.custom file"
  106. }