Fix sed commands for AUR packages, escape variables

This commit is contained in:
timvisee 2019-04-04 10:48:48 +02:00
parent 864e94ede3
commit 3a59911965
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
2 changed files with 18 additions and 14 deletions

View file

@ -292,9 +292,9 @@ package-aur:
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend-bin/PKGBUILD
- sed "s/^pkgver=.*\$/pkgver=$VERSION.$CI_COMMIT_SHORT_SHA/" -i ffsend-git/PKGBUILD
- sed "s/^source=(\"\(.*\)::.*\").*\$/source=(\"\1::$(echo $URL_SOURCE | sed 's/\//\\\//g')\")/" -i ffsend/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver::\).*\"/\1$URL_BIN\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver.bash::\).*\"/\1$URL_BASH_COMPLETION\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver.fish::\).*\"/\1$URL_FISH_COMPLETION\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver::\).*\"/\1$(echo $URL_BIN | sed 's/\//\\\//g')\")\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver.bash::\).*\"/\1$(echo $URL_BASH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver.fish::\).*\"/\1$(echo $URL_FISH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD
- sed "s/^sha256sums=.*\$/sha256sums=('$SHA_SOURCE')/" -i ffsend/PKGBUILD
- sed "s/^sha256sums=.*\$/sha256sums=('$SHA_BIN' '$SHA_BASH_COMPLETION' '$SHA_FISH_COMPLETION')/" -i ffsend-bin/PKGBUILD

View file

@ -154,10 +154,10 @@ available right now.
Make sure you meet and install the [requirements](#requirements).
See the operating system specific instructions below:
* [Linux](#linux-all-distributions)
* [macOS](#macos)
* [Windows](#windows)
* [_Other OS or architecture_](#other-os-or-architecture)
- [Linux](#linux-all-distributions)
- [macOS](#macos)
- [Windows](#windows)
- [_Other OS or architecture_](#other-os-or-architecture)
### Linux (all distributions)
Using the [snap](#linux-snap-package) package is recommended if supported.
@ -175,6 +175,7 @@ your home directory. Choose a different installation option if you don't want
this limitation._
`ffsend`][snapcraft-ffsend]
```bash
snap install ffsend
ffsend --help
@ -531,18 +532,21 @@ ffget https://send.firefox.com/#sample-share-url
```
This works for a predefined list of binary names:
* `ffput``ffsend upload ...`
* `ffget``ffsend download ...`
* `ffdel``ffsend delete ...`
* _This list is defined in [`src/config.rs`](./src/config.rs) as `INFER_COMMANDS`_
- `ffput``ffsend upload ...`
- `ffget``ffsend download ...`
- `ffdel``ffsend delete ...`
- _This list is defined in [`src/config.rs`](./src/config.rs) as `INFER_COMMANDS`_
You can use the following methods to set up these single-command binaries:
* Create a properly named symbolic link (recommended)
* Create a properly named hard link
* Clone the `ffsend` binary, and rename it
- Create a properly named symbolic link (recommended)
- Create a properly named hard link
- Clone the `ffsend` binary, and rename it
On Linux and macOS you can use the following command to set up symbolic links in
the current directory:
```bash
ln -s $(which ffsend) ./ffput
ln -s $(which ffsend) ./ffget