I38
Storm Dragon pushed changes to the master branch of the I38 project Updated the readme. Added power options to the panel mode. It relies on lxsession being installed and is optional, so not necessary for those who prefer to shutdown from the command line.
I38
@storm Hi. What are you using to have your git commits also anounced on mastodon?
re: I38
@tschapajew I made a couple git hooks. The prepush one is the one that posts commits:
@storm Oh. Tried to fetch it using the method described on the site: curl --output "pre-push" "https://git.stormux.org/storm/git-hooks/raw/branch/master/pre-push" but the file contained just two words: "Not found". Would you be so kind and show me how to setup this thing?
@storm Cloned the whole package with git clone https://git.stormux.org/storm/git-hooks now. What to do with these files? How can I authorize toot from the console without a graphical browser?
@tschapajew clone the repository, then simlink the pre-push wherever you want it. Example:
git clone https://git.stormux.org/storm/git-hooks
cd ProjectYouWantToPost/.git/hooks
ln -s path/to/git-hooks/pre-push-fediverse pre-push
Be sure to install and configure toot. it's a command line Mastodon client that also works with Pleroma. It is what handles actually posting to your timeline.
@tschapajew I think, it has been a while since I set it up so I could be wrong, but if it doesn't detect a DISPLAY it will give you a link you can paste in manually.
- replies
- 0
- announces
- 0
- likes
- 0
@storm And then run the script? Didn't check its contents. Will it do the push and then post on Mastodon?
@tschapajew You don't need to run the script manually. Just do your normal git work flow, when you push, the hook will run and it will post the commit assuming everything is set up correctly.
@storm Why does your hashbang line at the top of each file look so different? Mine always is #!bin/bash. Whats the difference with your interpreter?
@storm And where does the script know from it should run? I assume, I should put it also into the gitignore file, so its not pushed with my project?
@tschapajew It's a more modern way of writing the shabang line. I discovered it when trying to make audiogame-manager Mac compatible. I was trying to figure out why, even though I was using:
#!/usr/bin/bash
It was calling the old version even though people were installing a later version with homebrew. After some research, I found out tht using:
#!/usr/bin/env interpreter
Is more reliable. Of course, if you're only worried about Linux, which usually has an up to date bash, then:
#!/bin/bash
works just fine. I just got into the habbit of using env from that experience. I tend to use it for all shabangs now, python3, perl, bash etc.
@tschapajew no, you don't have to put anything regarding the hook into a .gitignore.
@storm Thank you. Did my other messages on the other account of yours make it through?
@tschapajew Yes, I am pretty sure I responded. I'll check again to make sure.