fix(update): adjust custom-sidebar script
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-21 15:00:13 -05:00
parent db9fc65213
commit e697963b46
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ if (args['v'] || args['vuetorrent']) {
}
if (args['c'] || args['custom-sidebar']) {
console.log(updateCustomPackage('lovelace-components.custom-sidebar'));
console.log(updateCustomPackage('scopedPackages.x86_64-linux.lovelace-components.custom-sidebar'));
}
if (args['s'] || args['some-sass-language-server']) {
@ -65,7 +65,7 @@ if (args['a'] || args['all']) {
console.log(vuetorrentOutput);
// This doesn't need to be added to commit msgs
console.log(updateCustomPackage('lovelace-components.custom-sidebar'));
console.log(updateCustomPackage('scopedPackages.x86_64-linux.lovelace-components.custom-sidebar'));
console.log(updateCustomPackage('some-sass-language-server'));

View file

@ -4,7 +4,7 @@ file="$FLAKE/scopedPackages/lovelace-components/custom-sidebar/default.nix"
old_hash="$(sed -n 's/.*hash = "\(.*\)";/\1/p' "$file")"
sed -i "s/hash = .*/hash = \"\";/" "$file"
npm_hash="$(nix build "$FLAKE#lovelace-components.custom-sidebar" |& sed -n 's/.*got: *//p')"
npm_hash="$(nix build "$FLAKE#scopedPackages.x86_64-linux.lovelace-components.custom-sidebar" |& sed -n 's/.*got: *//p')"
if [[ "$npm_hash" != "$old_hash" ]]; then
sed -i "s#hash = .*#hash = \"$npm_hash\";#" "$file"