-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
77 lines (59 loc) · 2.45 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Simple installer for small projects
===================================
There are use cases when project or simple set of filesystem entries
needed to be installed on target system or on build host for further
packaging to RPM/DEB/... package.
Implementing Makefile for this purpose might not be possible or
acceptable because of dependency on make(1) that might not be available
on small (embedded) systems.
Furthermore install target in Makefile most of the times wraps shell
script and therefore using make(1) for this purpose looks even less
reasonable.
Features
--------
o Direct installation on target system as superuser
o Packaging installation on build system
o Template expansion during install (e.g. @target@ ->
target system path)
o Customization through vars-sh and install-sh files
sourced from install.sh
o Wrapper deploy.sh to parse command line arguments to
environment variables used by install.sh
o Recursive installation for .subprojects/ with same
codebase
o POSIX Shell compliant (i.e. no bash(1) extensions)
with minimal set of coreutils provided binaries
(e.g. cp(1))
Usage
-----
Following steps could be used to connect this repository as submodule
to your project:
# Go do project's directory
$ cd <project_dir>
# Attach installsh project as submodule
$ git submodule add https://github.com/serhepopovych/installsh.git \
.subprojects/installsh
# Initialize and clone it
$ git submodule update --init --recursive
# Symlink to project's directory. This will be default SOURCE
# directory of installation unless explicitly given.
$ ln -snf .subprojects/installsh/install.sh
$ ln -snf .subprojects/installsh/deploy.sh
$ ln -snf .subprojects/installsh/alias-exec
# Add default vars-sh
$ cat >>vars-sh <<'_EOF'
# Inherit subproject(s) variables
inherit 'installsh/vars-sh'
_EOF
# Optionally create and customize install-sh
Customization
-------------
Unless explicitly required install.sh and deploy.sh shouldn't be
customized to change behaviour for specific project. Bug fixes,
improvements and new features aren't subject of this restrictions
and should be generally fixed in upstream project at github page:
https://github.com/serhepopovych/installsh.git
If specific actions required during the install for your project
consider adding them to install-sh. Also you might want to modify
vars-sh to set/unset specific variables (e.g. add new template for
expansion during install) or functions.