Browse Source

Fix sed commands for AUR packages, escape variables

timvisee 6 years ago
parent
commit
3a59911965
2 changed files with 18 additions and 14 deletions
  1. 3 3
      .gitlab-ci.yml
  2. 15 11
      README.md

+ 3 - 3
.gitlab-ci.yml

@@ -292,9 +292,9 @@ package-aur:
     - sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend-bin/PKGBUILD
     - sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend-bin/PKGBUILD
     - sed "s/^pkgver=.*\$/pkgver=$VERSION.$CI_COMMIT_SHORT_SHA/" -i ffsend-git/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/^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_SOURCE')/" -i ffsend/PKGBUILD
     - sed "s/^sha256sums=.*\$/sha256sums=('$SHA_BIN' '$SHA_BASH_COMPLETION' '$SHA_FISH_COMPLETION')/" -i ffsend-bin/PKGBUILD
     - sed "s/^sha256sums=.*\$/sha256sums=('$SHA_BIN' '$SHA_BASH_COMPLETION' '$SHA_FISH_COMPLETION')/" -i ffsend-bin/PKGBUILD
 
 

+ 15 - 11
README.md

@@ -154,10 +154,10 @@ available right now.
 Make sure you meet and install the [requirements](#requirements).
 Make sure you meet and install the [requirements](#requirements).
 
 
 See the operating system specific instructions below:
 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)
 ### Linux (all distributions)
 Using the [snap](#linux-snap-package) package is recommended if supported.  
 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._
 this limitation._
 
 
 [» `ffsend`][snapcraft-ffsend]
 [» `ffsend`][snapcraft-ffsend]
+
 ```bash
 ```bash
 snap install ffsend
 snap install ffsend
 ffsend --help
 ffsend --help
@@ -531,18 +532,21 @@ ffget https://send.firefox.com/#sample-share-url
 ```
 ```
 
 
 This works for a predefined list of binary names:
 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:
 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
 On Linux and macOS you can use the following command to set up symbolic links in
 the current directory:
 the current directory:
+
 ```bash
 ```bash
 ln -s $(which ffsend) ./ffput
 ln -s $(which ffsend) ./ffput
 ln -s $(which ffsend) ./ffget
 ln -s $(which ffsend) ./ffget