-
Notifications
You must be signed in to change notification settings - Fork 0
/
QUICKSTART
91 lines (75 loc) · 3.22 KB
/
QUICKSTART
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
78
79
80
81
82
83
84
85
86
87
88
89
90
GETTING STARTED
0) Select where you want to install sifs - this is represented by the shell
variable SIFS_HOME. Unpack the sifs system to SIFS_HOME.
You should see files like:
$SIFS_HOME/sifs.sh
$SIFS_HOME/README
$SIFS_HOME/sifs.conf.example
and several other things.
1) In your .bashrc (or similar) add these lines:
export EDITOR=vim # Or whatever you prefer.
export SIFS_HOME=/path/to/sifs
export SIFS_CONF=/path/to/sifs.conf
export SIFS_DOT_COMMANDS=y # Optional.
. $SIFS_HOME/sifs.sh
/path/to/sifs could be /etc/sifs or /home/<user>/sifs etc.
Make sure you set EDITOR to your favorite editor.
See section DOT COMMANDS below for SIFS_DOT_COMMANDS.
See example bashrc file that came with this project for
full example.
2) Create sifs.conf
% touch /path/to/sifs.conf
in /home/<user> or /etc or wherever you require.
3) Set up at least one sif file repository (SIFS_DIR). This is a directory
containing .sif files. You set one up by making the directory and then
appending its absolute location in SIFS_CONF (your sifs.conf file).
This directory should probably not be SIFS_HOME or inside SIFS_HOME.
For instance
% cat $SIFS_CONF
/home/user/sifs
% ls /home/user/sifs
some_project1.sif
some_project2.sif
... etc
4) Start creating sifs files; use .sif extension to signify the
file is a sif file ie is part of a sifs system.
Sif files tend to follow a specifc format - see SIF FILE FORMAT below.
Refer to SIFS_HOME/docs/editing.txt or run
% sifs.help
This creates template in your current sif repository (SIFS_DIR):
% sifs.add filename
The command:
% sifs.template
outputs a sifs template to stdout.
This creates template called filename in current directory:
% sifs.template filename
5) If you want to locate some of your sif files elsewhere (/x/y/z)
then update sifs.conf with a new entry:
/x/y/z/sifs
and move/create the relevant sif files there
% cp your_file.sif /x/y/z/sifs/
6) To load a sif file type 'c' and follow the prompts.
The 'd' key switches between sif repositories
(ie entries on sifs.conf aka SIFS_DIRs).
Most sif files will include a help function which you
access with 'h'.
To edit the sif file type 'e'.
To reload a sif file (if you've made changes), type 'i'.
That's pretty much it.
It's up to you to define the rest of your sif file - see points above.
To change repo, either type 'rc' or type 'd' then 'c'.
The former is probably the quickest.
Log in or re-include your bashrc file and run
% hh # General reference for commands.
% sifs.quickstart # This message.
% sifs.readme # Overall philosophy, guidelines, conventions.
% sifs.help # Stuff on creating a sif file.
7) SIFS now also allows you to create subdirectories within a SIFS_DIR.
Use these to group your sif files if you have a lot of them.
Example:
% sifs.mkdir foo # Creates SIFS_DIR/foo/
% c # Select foo.
% sifs.add foo_project # Creates SIFS_DIR/foo/foo_project.sif
% c # You can now choose foo_project.
% sifs.up # Takes you back up to SIFS_DIR
% c # Now you see top-level sif files and subdirs.