mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-23 11:21:12 +00:00
Improve snap model assertion code for readability
This commit is contained in:
parent
0e00214cc6
commit
5bbb8e6b3f
@ -429,8 +429,8 @@ snap_prepare_assertions() {
|
||||
|
||||
# Clear the assertions if they already exist
|
||||
if [ -e "$model_assertion" ] ; then
|
||||
existing_model=$(sed -n 's/^model: \(.*\)$/\1/p' $model_assertion)
|
||||
existing_brand=$(sed -n 's/^brand-id: \(.*\)$/\1/p' $model_assertion)
|
||||
existing_model=$(awk '/^model: / {print $2}' $model_assertion)
|
||||
existing_brand=$(awk '/^brand-id: / {print $2}' $model_assertion)
|
||||
echo "snap_prepare_assertions: replacing $existing_brand:$existing_model with $brand:$model"
|
||||
rm "$model_assertion"
|
||||
rm "$account_key_assertion"
|
||||
|
Loading…
x
Reference in New Issue
Block a user