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.

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