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.

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