PackageManager just because
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.

87 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. package Variables
  2. import (
  3. "os"
  4. )
  5. const (
  6. ConfigDir string = "/etc/tjpkg"
  7. DatabaseName string = "package_manager.db"
  8. FsHashDatabaseName string = "fs_hash.db"
  9. )
  10. var (
  11. Editor string = "vi"
  12. VerboseOutput bool = false
  13. IgnoreDepsCheck bool = false
  14. RootDir string = "/"
  15. FsHashPicksBucket []byte = []byte("FilesystemPicks")
  16. FsHashIndexBucket []byte = []byte("FilesystemIndex")
  17. PruneRegexPaths []string = []string{
  18. ConfigDir,
  19. "^/\\.git$",
  20. "^/dist$",
  21. "^/sources$",
  22. "^/boot/grub$",
  23. "^/proc$",
  24. "^/dev$",
  25. "^/mnt$",
  26. "^/sys$",
  27. "^/src$",
  28. "^/root$",
  29. "^/home$",
  30. "^/build$",
  31. "^/tools$",
  32. "^/opt$",
  33. "^/run/user$",
  34. "^/usr/share/zsh$",
  35. "^/usr/share/texmf-dist$",
  36. "^/usr/share/zoneinfo$",
  37. "^/usr/share/zoneinfo-leaps$",
  38. "^/tmp$",
  39. "^/var/db$",
  40. "^/var/cache$",
  41. "^/var/log$",
  42. "^/var/spool$",
  43. "^/var/lib/texmf$",
  44. "^/var/lib/postgres$",
  45. "^/var/lib/pacman$",
  46. "^/var/lib/NetworkManager$",
  47. "^/var/lib/systemd$",
  48. "^/var/lib/xkb/README.compiled$",
  49. "/lost\\+found$",
  50. }
  51. IgnoreRegexPaths []string = []string{
  52. os.Args[0],
  53. "^/swapfile$",
  54. "^/etc/passwd$",
  55. "^/etc/passwd-$",
  56. "^/etc/group$",
  57. "^/etc/group-$",
  58. "^/var/.updated$",
  59. "^/var/lib/mlocate/mlocate.db$",
  60. "^/var/lib/krb5kdc/kdc.conf$",
  61. "^/var/lib/alsa/asound.state$",
  62. "^/run/systemd/journal/kernel-seqnum$",
  63. }
  64. )
  65. func init() {
  66. var (
  67. rootDir string
  68. editor string
  69. )
  70. rootDir = os.Getenv("ROOTDIR")
  71. if rootDir != "" {
  72. RootDir = rootDir
  73. }
  74. editor = os.Getenv("EDITOR")
  75. if editor != "" {
  76. Editor = editor
  77. }
  78. }