Skip to content

Commit 8ab0e9c

Browse files
committed
Using bf http download
1 parent 4f257e5 commit 8ab0e9c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

overlay/etc/nu/scripts/bf-wordpress/conf.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export def get_salt [
4343
if ($file | bf fs is_not_file) {
4444
let url = "https://api.wordpress.org/secret-key/1.1/salt/"
4545
bf write $"Downloading fresh authentication secrets from ($url)." conf/get_salt
46-
http get --raw $url | save --force $file
46+
bf http download $url $file
4747
} else {
4848
bf write $"Reading authentication secrets from ($file)." conf/get_salt
4949
}

overlay/etc/nu/scripts/bf-wordpress/plugin.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def install [
3333
let name = $plugin_dir | path split | last
3434
let tmp = $"/tmp/($name)"
3535
let zip = $"($name).zip"
36-
http get --raw $url | save $zip
36+
bf http download $url $zip
3737

3838
# unzip files
3939
bf write debug $" .. unzipping source download files to ($tmp)" plugin/install

overlay/tmp/install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def install_source [] {
4949
bf write debug $"WordPress download url: ($url)." install_source
5050

5151
# get source download hash
52-
let hash = http get --raw $"($url).sha1"
52+
let hash = bf http download $"($url).sha1"
5353
bf write debug $"SHA1 hash for WordPress ($wp_version) [($wp_locale)]:(char newline)($hash)" install_source
5454

5555
# download source files to /tmp and verify checksum
5656
bf write $"Downloading WordPress ($wp_version) [($wp_locale)]." install_source
5757
let zip = "wp.zip"
58-
http get --raw $url | save --progress $zip
58+
bf http download $url $zip
5959
$"($hash) ($zip)" | ^sha1sum -c -
6060

6161
# unzip files

0 commit comments

Comments
 (0)