diff --git a/.gitea/workflows/update-pkgver.yaml b/.gitea/workflows/update-pkgver.yaml new file mode 100644 index 0000000..b45bd3b --- /dev/null +++ b/.gitea/workflows/update-pkgver.yaml @@ -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 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c589fca --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md index cdc1300..ac4d58b 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,33 @@ -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/` +# 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) +- [Go](https://wiki.archlinux.org/title/Go) (build-time) # Usage ``` -sshfs_connect +sshfsc ``` ## Arguments @@ -19,7 +36,7 @@ sshfs_connect | ------------- | ------------- | | -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 @@ -30,4 +47,4 @@ Host myserver HostName 127.0.0.1 User sshusername IdentityFile ~/.ssh/id_rsa -``` \ No newline at end of file +``` diff --git a/go.mod b/go.mod index 84e2eb5..0dc5b7c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module sshfs_connect +module sshfsc go 1.23.4