SlackBuilds package tool
Go to file
slakmagik 2447fd7a14 re{named,wrote} directory_checks() into dir_init()
Previously, the user was confronted with 7 prompts for directory
creation on first run to which they could hit enter or ^C in response.
The main purpose of this revision is to provide a nice printout and a
single question to which they can hit 'y/n'.

This led to a cascade of changes but it's all focused on establishing
sbopkg's needed directories and even results in fewer loc.

* directory_checks(): replaced with dir_init()
* config_check(): the ALLOW_MULTI check there was creating a directory
  rather than checking the config, so moved it to dir_init(). Also made
  the directory creation non-interactive since it's only creating a
  tmpdir in an already-created sbopkg directory.
* sync_repo(): moved the directory_check() call to select_repository()
  since being able to switch repos mid-run in the dialog
  select_repository() interface is the direct (and only) reason for
  calling dir_init() after startup. Removed the check_write() call and
  all the rest related to it as it was no longer needed.
* select_repository(): aside from gaining the item just mentioned, the
  'save setting' dialog was wrapped in a conditional based on whether
  the user actually chose to create the new repo dir.
* ck_dir(): removed. The seven calls in directory_checks() went with
  that function and the one in config_check() was also removed, since
  it's now handled by dir_init() non-interactively, leaving it unused.
* check_write(): removed. The single call from sync_repo() was removed,
  as discussed above, leaving it unused.
* pid_check(): now does a quick check for ALLOW_MULTI, making that a black
  box that does the right thing.
* main: as just mentioned, the ALLOW_MULTI check was moved into
  pid_check(). ALLOW_MULTI already gets special treatment in cleanup()
  and did in config_check() and does in dir_init(), so it might as well
  in pid_check() rather than being tested for in main. And, of course,
  replaced the directory_checks() call with one to dir_init().
2010-06-12 01:10:32 +00:00
src re{named,wrote} directory_checks() into dir_init() 2010-06-12 01:10:32 +00:00
tools tag and release version 0.33.1 2010-05-27 18:47:04 +00:00
ChangeLog-current.txt tag and release version 0.33.1 2010-05-27 18:47:04 +00:00