-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstash.1
152 lines (116 loc) · 3.26 KB
/
stash.1
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
.TH STASH 1 "date" "version 0.0.1"
.SH NAME
stash - a link management utility
.SH SYNOPSIS
.B stash
[\fB\-\-work\-tree\fR \fI<path>\fR] [\fB \-\-stash \fI<path>\fR] \fB<command>\fR [\fI<args>\fR]
.SH DESCRIPTION
\fBstash\fR manages symbolic links from multiple source directories into a
single target directory. In the rest of the document, the target directory is
called the \fIwork tree\fR; source directories are called \fIpackages\fR; and
the packages are stored in a directory called the \fIstash\fR.
.SH OPTIONS
.TP
\fB\-\-work-tree\fR \fI<path>\fR
Set the work tree to use for the current call to \fBstash\fR.
.TP
\fB\-\-stash\fR \fI<path>\fR
Set the stash directory to use for the current call to \fBstash\fR.
.SH EXIT STATUS
.B stash
returns 1 in case of error, 0 otherwise.
.SH COMMANDS
.TP
.B link \fI<package-name>\fR
Link the package \fI<package-name>\fR into the work tree. Create a symlink in the work tree for all the files present in the package \fI<package-name>\fR.
.TP
.B unlink \fI<package-name>\fR
Unlink the package \fI<package-name>\fR. Removes all symlinks from the work tree that points to the package \fI<package-name>\fR.
.TP
.B status [\fI<package-name>\fR]
Display the status of the package \fI<package-name>\fR, or of all packages if no argument is provided. The status of the package can be one of the following:
.RS
.IP - 2
linked, if the package is currently correctly linked into the work tree;
.IP -
unlinked, if the package is not currently linked into the work tree;
.IP -
1 missing link or \fIn\fR missing links, if the package is linked into the work tree but one or more links are missing;
.IP -
1 broken link or \fIn\fR broken links, if the package is not linked into the work tree but one or more broken links leads to the package directory.
.RE
.TP
.B rm\fR
Remove a package from the stash directory.
.TP
.B cd \fI<package-name>\fR
Change the current working directory to the directory of the package <package-name> in the stash.
.TP
.B version\fR
Show stash version.
.TP
.B help\fR
Show stash usage information, as well as current value for STASH_DIR and STASH_WORK_TREE environment variable.
.SH EXAMPLES
.TP
Install version 1.0 of app into a stash
.br
.B > cp src/app-1.0
.br
.B > make install PREFIX=$STASH_DIR/app-1.0
.TP
Link the newly install app package into the work tree
.br
.B stash link app-1.0
.TP
Install a new version of app
.br
.B > cp src/app-1.1
.br
.B > make install PREFIX=$STASH_DIR/app-1.1
.TP
Unlink the previous verison of app, and link the new one
.br
.B > stash unlink app-1.0
.br
.B > stash link app-1.1
.TP
Now two version of app are installed but only one is inlked into the work tree
.br
.B > stash status
.br
app-1.0 not linked
.br
app-1.1 linked
.TP
If the new version is statisfying, remove the previous install
.br
.B > stash rm app-1.0
.TP
Otherwise relink the previous version and uninstall the new one
.br
.B > stash unlink app-1.1
.br
.B > stash link app-1.0
.br
.B > stash rm app-1.1
.SH FILES
.TP
.B /usr/local\fR
The default work tree directory
.TP
.B /usr/local/stash\fR
The default stash dir where packages are stored
.SH ENVIRONMENT
.I
.TP
.I STASH_DIR
Sets the default stash directories.
.TP
.I STASH_WORK_TREE
Sets the default work tree.
.SH AUTHOR
.SH REPORTING BUGS
.SH SEE ALSO
.BR bash (1)
.BR ln (1)