add Makefile
This commit is contained in:
parent
c06b80f204
commit
ad2e45176a
32
Makefile
Normal file
32
Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
TESTDIR = test
|
||||
|
||||
INSTALL_FLS = config.html config.js index.html index.js imgsort.php style.css
|
||||
SRC_DIR = src
|
||||
SASS_CMD = sass --color --load-path=src/sass
|
||||
|
||||
|
||||
.PHONY: install start stop test php
|
||||
|
||||
install:
|
||||
ifndef DEST
|
||||
$(error Usage: `make install DEST=/installation/directory`)
|
||||
endif
|
||||
mkdir -p $(DEST)
|
||||
install -m 0744 $(foreach f,$(INSTALL_FLS),$(SRC_DIR)/$(f)) $(DEST)
|
||||
|
||||
# testing
|
||||
php:
|
||||
php -S localhost:8000 -t . &
|
||||
@# firefox http://localhost:8000/src/index.html
|
||||
stop:
|
||||
-killall php
|
||||
|
||||
# Compile the sass
|
||||
css:
|
||||
$(SASS_CMD) --no-indented src/sass/main.sass src/style.css
|
||||
|
||||
|
||||
test:
|
||||
-@rm -r $(TESTDIR)
|
||||
-@mkdir -p $(TESTDIR) $(TESTDIR)/staging $(TESTDIR)/dest1 $(TESTDIR)/dest2 $(TESTDIR)/dest3
|
||||
-@cp testres/* $(TESTDIR)/staging
|
@ -17,7 +17,8 @@ The web interface has mobile optimizations, letting you sort images/files on the
|
||||
|
||||
## Installation
|
||||
You need a *php* enabled web server, for example *nginx* with *php-fpm*.
|
||||
The web server needs to serve the app as well as the directory containg all images, called `rootDir`.
|
||||
To Install the app files in `/www/imgsort2`, use `make install DEST=/www/imgsort2`.
|
||||
The web server needs to serve the app files as well as the directory containg all images, called `rootDir`.
|
||||
You need to configure the `$rootDir` and `$rootPath` as well as the `$stagingDirName` accordingly in the `imgsort.php` file.
|
||||
|
||||
If you a using nextcloud, make sure to have the `rootDir` directory as an "external" storage media and not in the main nextcloud `data` directory.
|
||||
|
Loading…
Reference in New Issue
Block a user