Skip to content

Commit a2cb1e7

Browse files
committed
renamed executable and systemd unit to stagfs to avoid name conflicts
1 parent e4c8bb7 commit a2cb1e7

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

README.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@ Stag is fully functional, but it's **still in alpha**, so things might change a
1818

1919
# Installation
2020

21-
To run Stag, you need:
21+
## Requirements
2222

23-
- [FUSE](https://github.com/libfuse/libfuse)
24-
- [Python 3](https://www.python.org/)
25-
- [Click](https://click.palletsprojects.com/en/stable/) (Python package)
26-
- [fusepy](https://github.com/fusepy/fusepy) (Python package)
27-
28-
You can install Click and fusepy using pip:
29-
30-
```console
31-
$ pip install click fusepy
32-
```
23+
Before running Stag, ensure you have the following dependencies installed
3324

34-
Make sure FUSE and Python is installed using your system's package manager (e.g., `apt`, `dnf`, `pacman`).
25+
- [FUSE](https://github.com/libfuse/libfuse)
26+
- [Python 3](https://www.python.org/) (version 3.6 or newer recommended)
27+
- [Click](https://pypi.org/project/click/) (Python package for command-line interfaces)
28+
- [fusepy](https://pypi.org/project/fusepy/) (Python bindings for FUSE)
3529

3630
## Manual Installation
3731

@@ -50,27 +44,24 @@ $ chmod +x stag
5044
and move it to a directory in your `$PATH`, e.g.
5145

5246
```console
53-
$ mv stag ~/.local/bin/
47+
$ mv stag ~/usr/bin/stagfs
5448
```
5549

56-
If you want Stag to run in the background using Systemd, download the unit file and place it somewhere Systemd can find it
50+
To run Stag in the background with Systemd, download the provided unit file and place it in your user systemd directory:
5751

5852
```console
59-
$ wget https://github.com/jpmvferreira/stag/raw/refs/heads/master/stag@.service -O ~/.config/systemd/user/stag@.service
53+
$ wget https://github.com/jpmvferreira/stag/raw/refs/heads/master/stag@.service -O ~/.config/systemd/user/stagfs@.service
6054
$ systemctl --user daemon-reload
6155
```
6256

63-
this will allow you to manage Stag mounts easier.
64-
65-
> [!NOTE]
66-
> Systemd units do not inherit your user's environment variables, so you may need to change the path to the Stag executable and repository location in the unit file.
57+
this enables you to easily manage Stag mounts using Systemd commands.
6758

6859
# Usage
6960

7061
To begin using Stag, first create a repository. For example, to create a repository named `myrepo`
7162

7263
```console
73-
$ stag init myrepo
64+
$ stagfs init myrepo
7465
```
7566

7667
> [!NOTE]
@@ -79,25 +70,25 @@ $ stag init myrepo
7970
You can list all repositories at any time with
8071

8172
```console
82-
$ stag ls
73+
$ stagfs ls
8374
```
8475

8576
Stag works by mounting your repository as a virtual filesystem. To do this, create a mount point and mount your repository
8677

8778
```console
8879
$ mkdir mnt
89-
$ stag mount myrepo mnt
80+
$ stagfs mount myrepo mnt
9081
$ cd mnt
9182
```
9283

9384
> [!TIP]
9485
> If you use the Systemd unit file, you can mount a repository in the background with:
9586
> ```
96-
> systemctl --user start stag@<name>:<full path>
87+
> systemctl --user start stagfs@<repository name>:<mount point>
9788
> ```
9889
> Systemd will warn you about using `/`, to avoid issues, replace all `/` with `-`, e.g.:
9990
> ```
100-
> systemctl --user enable now stag@wallpapers:-home-user-wallpapers-
91+
> systemctl --user enable now stagfs@wallpapers:-home-user-wallpapers-
10192
> ```
10293
10394
Add files to your repository as you would in any directory, by copying or moving them into the mount point. For demonstration purposes, let's create the following files

stag@.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description=Mount Stag repository (syntax: <name>:<mount>) for %I
33
Documentation=https://www.github.com/jpmvferreira/stag
44

55
[Service]
6-
ExecStart=/bin/bash -c '/usr/bin/stag -r "%h/.local/share/stag" mount "${0%%:*}" "${0#*:}"' '%I'
6+
ExecStart=/bin/bash -c '/usr/bin/stagfs -r "%h/.local/share/stag" mount "${0%%:*}" "${0#*:}"' '%I'
77

88
[Install]
99
WantedBy=default.target

0 commit comments

Comments
 (0)