This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
set -x
|
||||
|
||||
# TODO: Update pobfrontend as well?
|
||||
|
||||
@@ -14,8 +15,12 @@ hash=$(jq '.args.hash' <<< "$nurl_output")
|
||||
echo "Updating pob to $rev"
|
||||
|
||||
# Find lines to replace
|
||||
line_numbers=$(grep -Fn "rev =" packages/pob.nix| cut -d":" -f1)
|
||||
line_data=$(head -n1 <<< "$line_numbers")
|
||||
rev_line_numbers=$(grep -Fn "rev =" packages/pob.nix| cut -d":" -f1)
|
||||
rev_line_data=$(head -n1 <<< "$rev_line_numbers")
|
||||
sed -i "${rev_line_data}s/.*/ rev = $rev;/" packages/pob.nix
|
||||
|
||||
hash_line_numbers=$(grep -Fn "hash =" packages/pob.nix| cut -d":" -f1)
|
||||
hash_line_data=$(head -n1 <<< "$hash_line_numbers")
|
||||
sed -i "${hash_line_data}s/.*/ hash = $hash;/" packages/pob.nix
|
||||
|
||||
sed -i "${line_data}s/.*/ rev = $rev;/" packages/pob.nix
|
||||
nixfmt packages/pob.nix
|
||||
|
Reference in New Issue
Block a user