mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
28 lines
784 B
Bash
28 lines
784 B
Bash
pkgname=toohardforyou
|
|
|
|
post_install() {
|
|
if [ -e /usr/share/$pkgname/data/HighScores.dat ]; then
|
|
if [ -e /usr/share/$pkgname/data/config.dat ]; then
|
|
echo "Highscores and config files will be keeped"
|
|
else
|
|
touch /usr/share/$pkgname/data/config.dat
|
|
touch /usr/share/$pkgname/data/HighScores.dat
|
|
chmod 777 /usr/share/$pkgname/data/{config.dat,HighScores.dat}
|
|
fi
|
|
else
|
|
touch /usr/share/$pkgname/data/config.dat
|
|
touch /usr/share/$pkgname/data/HighScores.dat
|
|
chmod 777 /usr/share/$pkgname/data/{config.dat,HighScores.dat}
|
|
fi
|
|
}
|
|
|
|
post_upgrade() {
|
|
post_install $1
|
|
}
|
|
|
|
|
|
post_remove() {
|
|
cp /usr/share/share/$pkgname/data/config.dat /usr/share/share/$pkgname/data/config.dat.back
|
|
cp /usr/share/share/$pkgname/data/HighScores.dat /usr/share/share/$pkgname/data/HighScores.dat.back
|
|
}
|