2025-06-12 10:14:05 +02:00
|
|
|
%pretrans -p <lua>
|
2025-07-21 17:47:24 +02:00
|
|
|
path = "%{_firmwaredir}/qcom/LENOVO/21BX"
|
2025-06-12 10:14:05 +02:00
|
|
|
st = posix.stat(path)
|
|
|
|
if st and st.type == "directory" then
|
2025-07-21 17:47:24 +02:00
|
|
|
path2 = path .. ".rpmmoved"
|
|
|
|
if not os.rename(path, path2) then
|
|
|
|
print("Cannot rename to " .. path2)
|
|
|
|
os.exit(1)
|
2025-06-12 10:14:05 +02:00
|
|
|
end
|
|
|
|
end
|
2025-07-21 17:47:24 +02:00
|
|
|
|
|
|
|
%posttrans
|
|
|
|
if test -d %{_firmwaredir}/qcom/LENOVO/21BX.rpmmoved; then
|
|
|
|
rm -rf %{_firmwaredir}/qcom/LENOVO/21BX.rpmmoved
|
|
|
|
fi
|