1. diff -u -N -Z -r pkgutils-5.36.orig/pkgmk.conf pkgutils-5.36/pkgmk.conf
  2. --- pkgutils-5.36.orig/pkgmk.conf 2016-05-28 02:57:54.206594874 +0300
  3. +++ pkgutils-5.36/pkgmk.conf 2016-05-28 02:58:36.070592377 +0300
  4. @@ -26,6 +26,7 @@
  5. # PKGMK_SOURCE_DIR="$PWD"
  6. # PKGMK_PACKAGE_DIR="$PWD"
  7. # PKGMK_WORK_DIR="$PWD/work"
  8. +# PKGMK_CREATE_DIRS="no"
  9. # PKGMK_DOWNLOAD="no"
  10. # PKGMK_IGNORE_FOOTPRINT="no"
  11. # PKGMK_IGNORE_NEW="no"
  12. diff -u -N -Z -r pkgutils-5.36.orig/pkgmk.conf.5.in pkgutils-5.36/pkgmk.conf.5.in
  13. --- pkgutils-5.36.orig/pkgmk.conf.5.in 2016-05-28 02:57:54.206594874 +0300
  14. +++ pkgutils-5.36/pkgmk.conf.5.in 2016-05-28 03:02:46.725577426 +0300
  15. @@ -44,6 +44,11 @@
  16. .br
  17. Default: '\fBfoo\fP/work', where \fBfoo\fP is the directory of the Pkgfile.
  18. .TP
  19. +\fBPKGMK_CREATE_DIRS='STRING'\fP
  20. +Create directories for downloading, building and storing packages if missing.
  21. +.br
  22. +Default: 'no'
  23. +.TP
  24. \fBPKGMK_DOWNLOAD_PROG='STRING'\fP
  25. Use specified program to download source archives. Valid strings are curl and wget.
  26. .br
  27. diff -u -N -Z -r pkgutils-5.36.orig/pkgmk.in pkgutils-5.36/pkgmk.in
  28. --- pkgutils-5.36.orig/pkgmk.in 2016-05-28 02:57:54.206594874 +0300
  29. +++ pkgutils-5.36/pkgmk.in 2016-05-28 03:16:54.021526890 +0300
  30. @@ -76,8 +76,13 @@
  31. check_directory() {
  32. if [ ! -d $1 ]; then
  33. - error "Directory '$1' does not exist."
  34. - exit $E_DIR_PERM
  35. + if [ "$PKGMK_CREATE_DIRS" = "yes" ]; then
  36. + warning "Creating directory: $1"
  37. + mkdir -p "$1"
  38. + else
  39. + error "Directory '$1' does not exist."
  40. + exit $E_DIR_PERM
  41. + fi
  42. elif [ ! -w $1 ]; then
  43. error "Directory '$1' not writable."
  44. exit $E_DIR_PERM
  45. @@ -734,6 +739,7 @@
  46. PKGMK_SOURCE_DIR="$PWD"
  47. PKGMK_PACKAGE_DIR="$PWD"
  48. PKGMK_WORK_DIR="$PWD/work"
  49. +PKGMK_CREATE_DIRS="no"
  50. PKGMK_COMPRESSION_MODE="gz"

create-dirs.patch