Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 12 Apr 2001 16:58:18 -0000 1.3
@@ -232,10 +232,6 @@
unset apm_first_time_loading_p
}
-
-
-
-
ad_proc -public apm_file_watch {path} {
Marks the file of the indicated path to be watched. If the file changes,
@@ -351,150 +347,6 @@
"]
}
-
-ad_proc -private apm_guess_file_type { package_key path } {
-
- Guesses and returns the file type key corresponding to a particular path
- (or an empty string if none is known). $path
should be
- relative to the package directory (e.g., www/index.tcl
- for /packages/bboard/admin-www/index.tcl
. We use the following rules:
-
-
.sql
are considered data-model files,
- or if any path contains the substring upgrade
, data-model upgrade
- files.
- .sqlj
are considered sqlj_code files.
- .info
are considered package specification files.
- .xql
are considered query files.
- .java
are considered java code files.
- .jar
are considered java archive files.
- doc
are considered
- documentation files.
- .pl
or .sh
or
- which have a path component named
- bin
, are considered shell-executable files.
- templates
are considered
- template files.
- .html
or .adp
, in the top
- level of the package, are considered documentation files.
- www
or admin-www
- are considered content-page files.
- -procs(-)+()*.tcl)
or -init.tcl
are considered
- Tcl procedure or Tcl initialization files, respectively.
- .tcl
are considered Tcl utility script files (normally
- found only in the bootstrap installer).
- $path
should be
- relative to the package directory (e.g., www/index.tcl
- for /packages/bboard/admin-www/index.tcl
.
-
- We consider two cases:
-
- 1. Data model files.
-
- If the path contains a string matching "sql/" followed by a database type known
- to this version of OpenACS, the file is assumed to be specific to that database type.
- The empty string is returned for all other data model files.
-
- Example: "sql/postgresql/apm-create.sql" is assumed to be the PostgreSQL-specific
- file used to create the APM datamodel.
-
- 2. Other files.
-
- If the file name contains a dash and database type, the file is assumed to be
- specific to that database type.
-
- Example: "tcl/10-database-postgresql-proc.tcl" is asusmed to be the file that
- defines the PostgreSQL-specific portions of the database API.
-
-} {
- set components [split $path "/"]
-
- if { [string match "data_model*" [apm_guess_file_type $package_key $path]] } {
- set sql_index [lsearch $components "sql"]
- if { $sql_index >= 0 } {
- set db_dir [lindex $components [expr $sql_index + 1]]
- foreach known_database_type [db_known_database_types] {
- if { [string match [lindex $known_database_type 0] $db_dir] } {
- return $db_dir
- }
- }
- }
- return ""
- }
-
- set file_name [file tail $path]
- foreach known_database_type [db_known_database_types] {
- if { [string match "*-[lindex $known_database_type 0]\.*" $file_name] } {
- return [lindex $known_database_type 0]
- }
- }
- return ""
-}
-
ad_proc -private apm_ignore_file_p { path } {
Return 1 if $path should, in general, be ignored for package operations.