by abemassry on 10/10/13, 3:47 PM with 11 comments
by dsy on 10/10/13, 7:53 PM
> filename=$(echo "$1" | sed 's/\// /g' | awk '{ print $4 }')
1. You could remove the sed, if you change the field separator:
$(echo "$1" | awk 'BEGIN {FS="/"} {print $5}'
(this might be better for file names with spaces in them; though, if I understand your use case, this will never happen, but you might need to deal with space-to-%20 in wsend-gpg and then %20-to-space in wget-gpg...)2. Or you could just replace this with:
filename=$(basename "$1")
> filenamed=$(echo "$filename" | sed 's/.gpg//')3. The problem that this cuts the first occurrence of .gpg in the file name, so nitpick.gpg.nitpick.gpg will become nitpick.nitpick.gpg instead of nitpick.gpg.nitpick
To remove this substring from the end of the string, you can probably replace the pattern with a greedy one or just use:
filenamed=${filename%.gpg}
EDIT: previous related discussions:https://news.ycombinator.com/item?id=6083884
https://news.ycombinator.com/item?id=6158719
https://news.ycombinator.com/item?id=6179424
I like your persistence and glad you finally made it to the front page. Good luck.
by psuter on 10/10/13, 5:39 PM
(My personal preference would be to deploy the service on my own VPS, though.)
by CountHackulus on 10/10/13, 4:32 PM
by Systemic33 on 10/10/13, 9:23 PM
Since you will probably iterate new versions fast and update, may I suggest embedding an update checker into the program. Atleast until you get properly setup in the different distro repo's.
by lectrick on 10/10/13, 9:32 PM
by kernel_sanders on 10/10/13, 6:55 PM
by dancecodes on 10/11/13, 10:18 AM
by dancecodes on 10/11/13, 10:14 AM
please provide ebuild and add to gentoo portage