Compare commits
2 Commits
962ef84675
...
eb93777faa
| Author | SHA1 | Date | |
|---|---|---|---|
| eb93777faa | |||
| 40961b10c0 |
43
.gitea/workflows/update-pkgver.yaml
Normal file
43
.gitea/workflows/update-pkgver.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# ABOUTME: Updates pkgver in moonarch-pkgbuilds after a push to main.
|
||||||
|
# ABOUTME: Ensures paru detects new versions of this package.
|
||||||
|
|
||||||
|
name: Update PKGBUILD version
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-pkgver:
|
||||||
|
runs-on: moonarch
|
||||||
|
steps:
|
||||||
|
- name: Checkout source repo
|
||||||
|
run: |
|
||||||
|
git clone --bare http://gitea:3000/nevaforget/sshfs_connect.git source.git
|
||||||
|
cd source.git
|
||||||
|
PKGVER=$(git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./')
|
||||||
|
echo "New pkgver: $PKGVER"
|
||||||
|
echo "$PKGVER" > /tmp/pkgver
|
||||||
|
|
||||||
|
- name: Update PKGBUILD
|
||||||
|
run: |
|
||||||
|
PKGVER=$(cat /tmp/pkgver)
|
||||||
|
git clone http://gitea:3000/nevaforget/moonarch-pkgbuilds.git pkgbuilds
|
||||||
|
cd pkgbuilds
|
||||||
|
|
||||||
|
OLD_VER=$(grep '^pkgver=' sshfsc-git/PKGBUILD | cut -d= -f2)
|
||||||
|
if [ "$OLD_VER" = "$PKGVER" ]; then
|
||||||
|
echo "pkgver already up to date ($PKGVER)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i "s/^pkgver=.*/pkgver=$PKGVER/" sshfsc-git/PKGBUILD
|
||||||
|
sed -i "s/^\tpkgver = .*/\tpkgver = $PKGVER/" sshfsc-git/.SRCINFO
|
||||||
|
echo "Updated pkgver: $OLD_VER → $PKGVER"
|
||||||
|
|
||||||
|
git config user.name "pkgver-bot"
|
||||||
|
git config user.email "gitea@moonarch.de"
|
||||||
|
git add sshfsc-git/PKGBUILD sshfsc-git/.SRCINFO
|
||||||
|
git commit -m "chore(sshfsc-git): bump pkgver to $PKGVER"
|
||||||
|
git -c http.extraHeader="Authorization: token ${{ secrets.PKGBUILD_TOKEN }}" push
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Dominik Kressler
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
21
README.md
21
README.md
@ -2,15 +2,32 @@ Quickly mount remote systems via SSHFS based on your ssh_config
|
|||||||
|
|
||||||
Static mount dir is currently `~/Servers/<Host>`
|
Static mount dir is currently `~/Servers/<Host>`
|
||||||
|
|
||||||
|
# Install
|
||||||
|
|
||||||
|
## Arch Linux (Moonarch repo)
|
||||||
|
|
||||||
|
Available in the Moonarch package repository as `sshfsc-git`:
|
||||||
|
|
||||||
|
```
|
||||||
|
paru -S sshfsc-git
|
||||||
|
```
|
||||||
|
|
||||||
|
## From source
|
||||||
|
|
||||||
|
```
|
||||||
|
go build -o sshfsc
|
||||||
|
install -Dm755 sshfsc /usr/local/bin/sshfsc
|
||||||
|
```
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
- [SSHFS](https://wiki.archlinux.org/title/SSHFS)
|
- [SSHFS](https://wiki.archlinux.org/title/SSHFS)
|
||||||
- [Go](https://wiki.archlinux.org/title/Go)
|
- [Go](https://wiki.archlinux.org/title/Go) (build-time)
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
```
|
```
|
||||||
sshfs_connect <Host>
|
sshfsc <Host>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Arguments
|
## Arguments
|
||||||
|
|||||||
15
main.go
15
main.go
@ -75,7 +75,20 @@ func verify_mount_dir(hostname string)(mount string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func mount_sshfs(hostname string, user string, ifile string, port string, mount string) {
|
func mount_sshfs(hostname string, user string, ifile string, port string, mount string) {
|
||||||
cmd := exec.Command("sshfs", "-p", port, "-o", "IdentityFile="+ifile+",idmap=user,dir_cache=no", user+"@"+hostname+":/", mount)
|
cmd := exec.Command("sshfs", "-p", port,
|
||||||
|
"-o", "IdentityFile="+ifile,
|
||||||
|
"-o", "idmap=user",
|
||||||
|
"-o", "cache=yes",
|
||||||
|
"-o", "kernel_cache",
|
||||||
|
"-o", "attr_timeout=60",
|
||||||
|
"-o", "entry_timeout=60",
|
||||||
|
"-o", "negative_timeout=20",
|
||||||
|
"-o", "Ciphers=aes128-gcm@openssh.com",
|
||||||
|
"-o", "Compression=no",
|
||||||
|
"-o", "reconnect",
|
||||||
|
"-o", "ServerAliveInterval=15",
|
||||||
|
"-o", "ServerAliveCountMax=3",
|
||||||
|
user+"@"+hostname+":/", mount)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user