mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-04 05:47:14 +08:00
update cinstall
This commit is contained in:
parent
6f06489ede
commit
a934369596
@ -9,13 +9,13 @@
|
|||||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||||
|
|
||||||
pkgname=cinstall
|
pkgname=cinstall
|
||||||
pkgver=20100618
|
pkgver=20100622
|
||||||
pkgrel=5
|
pkgrel=1
|
||||||
depends=('kdelibs' 'qt' )
|
depends=('kdelibs' 'qt' )
|
||||||
pkgdesc="Drake Justice's Bundle Creator/Launcher and Package-Manager"
|
pkgdesc="Drake Justice's Bundle Creator/Launcher and Package-Manager"
|
||||||
arch=("i686" "x86_64")
|
arch=("i686" "x86_64")
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
#install=$pkgname.install
|
install=$pkgname.install
|
||||||
url="http://chakra-project.org/"
|
url="http://chakra-project.org/"
|
||||||
optdepends=('akabei: for akabei support'
|
optdepends=('akabei: for akabei support'
|
||||||
'pacman: for pacman support')
|
'pacman: for pacman support')
|
||||||
|
115
cinstall/cinstall.install
Normal file
115
cinstall/cinstall.install
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
post_install() {
|
||||||
|
if [ -e "/etc/chakra/updates.conf" ] ; then
|
||||||
|
|
||||||
|
. /etc/chakra/updates.conf
|
||||||
|
|
||||||
|
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
||||||
|
/usr/bin/chakra-update-icons
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo " > WARNING"
|
||||||
|
echo " The package kde-common seems not to be installed,"
|
||||||
|
echo " this can possibly break the installation. Just install it"
|
||||||
|
echo " manually after this installation/update, run the following"
|
||||||
|
echo " commands and restart KDE afterwards:"
|
||||||
|
echo " sudo chakra-config-updater"
|
||||||
|
echo " kbuildsycoca4"
|
||||||
|
echo " "
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Create group bundle"
|
||||||
|
|
||||||
|
if [ "Group: `grep bundle /etc/group`" = "Group: " ] ; then
|
||||||
|
groupadd bundle
|
||||||
|
else
|
||||||
|
echo "Group bundle already exists"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Adding all existing users to group bundle"
|
||||||
|
|
||||||
|
for i in `cat /etc/passwd | grep /home | cut -d: -f1` ; do
|
||||||
|
echo " - adding user $i"
|
||||||
|
usermod -a -G bundle $i
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Mod sudoers file"
|
||||||
|
if [ "sudoers: `grep bundle /etc/sudoers`" = "sudoers: " ] ; then
|
||||||
|
echo "%bundle ALL=(ALL) NOPASSWD: /sbin/mount -o loop -t squashfs" >> /etc/sudoers
|
||||||
|
echo "ensure correct sudoers permissions"
|
||||||
|
chmod -v 0440 /etc/sudoers
|
||||||
|
else
|
||||||
|
echo "sudoers file already modded"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
if [ -e "/etc/chakra/updates.conf" ] ; then
|
||||||
|
|
||||||
|
. /etc/chakra/updates.conf
|
||||||
|
|
||||||
|
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
||||||
|
/usr/bin/chakra-update-icons
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo " > WARNING"
|
||||||
|
echo " The package kde-common seems not to be installed,"
|
||||||
|
echo " this can possibly break the installation. Just install it"
|
||||||
|
echo " manually after this installation/update, run the following"
|
||||||
|
echo " commands and restart KDE afterwards:"
|
||||||
|
echo " sudo chakra-config-updater"
|
||||||
|
echo " kbuildsycoca4"
|
||||||
|
echo " "
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Create group bundle"
|
||||||
|
|
||||||
|
if [ "Group: `grep bundle /etc/group`" = "Group: " ] ; then
|
||||||
|
groupadd bundle
|
||||||
|
else
|
||||||
|
echo "Group bundle already exists"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Adding all existing users to group bundle"
|
||||||
|
|
||||||
|
for i in `cat /etc/passwd | grep /home | cut -d: -f1` ; do
|
||||||
|
echo " - adding user $i"
|
||||||
|
usermod -a -G bundle $i
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Mod sudoers file"
|
||||||
|
if [ "sudoers: `grep bundle /etc/sudoers`" = "sudoers: " ] ; then
|
||||||
|
echo "%bundle ALL=(ALL) NOPASSWD: /sbin/mount -o loop -t squashfs" >> /etc/sudoers
|
||||||
|
echo "ensure correct sudoers permissions"
|
||||||
|
chmod -v 0440 /etc/sudoers
|
||||||
|
else
|
||||||
|
echo "sudoers file already modded"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
if [ -e "/etc/chakra/updates.conf" ] ; then
|
||||||
|
|
||||||
|
. /etc/chakra/updates.conf
|
||||||
|
|
||||||
|
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
||||||
|
/usr/bin/chakra-update-icons
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo " > WARNING"
|
||||||
|
echo " The package kde-common seems not to be installed,"
|
||||||
|
echo " this can possibly break the installation. Just install it"
|
||||||
|
echo " manually after this installation/update, run the following"
|
||||||
|
echo " commands and restart KDE afterwards:"
|
||||||
|
echo " sudo chakra-config-updater"
|
||||||
|
echo " kbuildsycoca4"
|
||||||
|
echo " "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
op=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
$op $*
|
Loading…
Reference in New Issue
Block a user