dont require slashes
This commit is contained in:
parent
0a3a32f9d1
commit
271acaafe0
12
Makefile
12
Makefile
@ -1,13 +1,12 @@
|
||||
# CONFIGURE at least ROOT_DIR and INSTALL_DIR
|
||||
# All paths without trailing slashes
|
||||
|
||||
# Absolute path to the directory containing all image directories as well as the staging directory
|
||||
# MUST HAVE A TRAILING SLASH
|
||||
# eg: ROOT_DIR = /data/images
|
||||
# ROOT_DIR =
|
||||
|
||||
# The URI at which the ROOT_DIR will be served
|
||||
# MUST HAVE A TRAILING SLASH
|
||||
ROOT_PATH = /images/
|
||||
ROOT_PATH = /images
|
||||
|
||||
# Path of the directory containing all the files to be sorted, relative to ROOT_DIR
|
||||
# eg: STAGING_DIR = .sort
|
||||
@ -46,16 +45,15 @@ install: $(INSTALL_FLS) imgsort2-nginx.conf imgsort2-php-fpm.conf
|
||||
|
||||
|
||||
$(INSTALL_DIR)/%.php: $(SRC_DIR)/%.php
|
||||
sed 's|$$rootDir = .*|$$rootDir = "$(ROOT_DIR)";|; s|$$rootPath = .*|$$rootPath = "$(ROOT_PATH)"|; s|$$stagingDirName = .*|$$stagingDirName = "$(STAGING_DIR)";|' @< > $@
|
||||
sed 's|$$rootDir = .*|$$rootDir = "$(ROOT_DIR)/";|; s|$$rootPath = .*|$$rootPath = "$(ROOT_PATH)/"|; s|$$stagingDirName = .*|$$stagingDirName = "$(STAGING_DIR)/";|' $< > $@
|
||||
chmod 0744 $@
|
||||
|
||||
$(INSTALL_DIR)/%: $(SRC_DIR)/%
|
||||
install -m 0744 $< $@
|
||||
|
||||
%.conf: $(SRC_DIR)/%.conf
|
||||
sed 's|root = .*|$$root = $(INSTALL_DIR);|; s|location /images/|location $(ROOT_PATH)|; s|$$alias = .*|alias = $(ROOT_DIR);|' @< > $@
|
||||
chmod 0744 $@
|
||||
$(SED_COMMAND) $< > $@
|
||||
sed 's|root = .*|$$root = $(INSTALL_DIR);|; s|location /images/|location $(ROOT_PATH)/|; s|$$alias = .*|alias = $(ROOT_DIR);|' $< > $@
|
||||
chmod 0740 $@
|
||||
|
||||
clean:
|
||||
rm $(INSTALL_FLS)
|
||||
|
Loading…
Reference in New Issue
Block a user