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.

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