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.

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