Compare commits

..

No commits in common. "eb93777faaee0fe455f627b592b81463a48f0c60" and "962ef8467526fd2ea2df0ed2b93521b69e67f7be" have entirely different histories.

5 changed files with 7 additions and 101 deletions

View File

@ -1,43 +0,0 @@
# 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
View File

@ -1,21 +0,0 @@
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.

View File

@ -1,33 +1,16 @@
Quickly mount remote systems via SSHFS based on your ssh_config
Quickly mount remote systems via SSHFS based on your ssh_config
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
- [SSHFS](https://wiki.archlinux.org/title/SSHFS)
- [Go](https://wiki.archlinux.org/title/Go) (build-time)
- [Go](https://wiki.archlinux.org/title/Go)
# Usage
```
sshfsc <Host>
sshfs_connect <Host>
```
## Arguments
@ -36,7 +19,7 @@ sshfsc <Host>
| ------------- | ------------- |
| -e | open mountpoint in your editor |
Editor Sublime-Text (subl) is currently hardcoded. [See](https://gitea.moonarch.de/nevaforget/sshfs_connect/issues/1)
Editor Sublime-Text (subl) is currently hardcoded. [See](https://gitea.moonarch.de/nevaforget/sshfs_connect/issues/1)
# Example ssh config
@ -47,4 +30,4 @@ Host myserver
HostName 127.0.0.1
User sshusername
IdentityFile ~/.ssh/id_rsa
```
```

2
go.mod
View File

@ -1,4 +1,4 @@
module sshfsc
module sshfs_connect
go 1.23.4

15
main.go
View File

@ -75,20 +75,7 @@ func verify_mount_dir(hostname 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,
"-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 := exec.Command("sshfs", "-p", port, "-o", "IdentityFile="+ifile+",idmap=user,dir_cache=no", user+"@"+hostname+":/", mount)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()