kylin-system-updater/debian/postinst

17 lines
807 B
Bash

#!/bin/bash
if [ ! -d /var/cache/kylin-system-updater ];then
mkdir -p /var/cache/kylin-system-updater
fi
if [ ! -f /var/cache/kylin-system-updater/kylin-system-updater.db ];then
echo "Copying database to the specified path ..."
cp -r /usr/share/kylin-system-updater/kylin-system-updater.db /var/cache/kylin-system-updater/
fi
systemctl enable kylin-system-updater
mkdir -p /usr/lib/`dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/
mv /usr/lib/libupgrade.so /usr/lib/`dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/
if [ -f /usr/lib/`dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libupgrade.so.old ];then
echo "Remove old libupgrade.so.old..."
rm /usr/lib/`dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libupgrade.so.old
fi