mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-01-28 18:20:21 +00:00
updated
This commit is contained in:
2
buildpkg
2
buildpkg
@@ -428,7 +428,7 @@ help() {
|
||||
echo -e "Example:"
|
||||
echo -e "\t`basename $0` -fr -kw -i this will force rebuild, install package and keep working directory"
|
||||
echo -e ""
|
||||
echo -e "Option:"
|
||||
echo -e "Options:"
|
||||
echo -e "\t-i,\t--install install package into system"
|
||||
echo -e "\t-u,\t--upgrade upgrade package"
|
||||
echo -e "\t-r,\t--reinstall reinstall package"
|
||||
|
||||
11
functions
11
functions
@@ -90,16 +90,19 @@ nocolor() {
|
||||
updatesystemdb() {
|
||||
|
||||
# update desktop database
|
||||
msg2 "Updating desktop database..."
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q /usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# update mime database
|
||||
if [ -x /usr/bin/update-mime-database ]; then
|
||||
/usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1
|
||||
fi
|
||||
#msg2 "Updating mime database..."
|
||||
#if [ -x /usr/bin/update-mime-database ]; then
|
||||
#/usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1
|
||||
#fi
|
||||
|
||||
# update icon cache
|
||||
msg2 "Updating icon cache..."
|
||||
if [ -f /usr/bin/gtk-update-icon-cache ]; then
|
||||
find /usr/share/icons -mindepth 1 -maxdepth 1 -type d | while read -r THEME; do
|
||||
if [ -f "$THEME/index.theme" ]; then
|
||||
@@ -109,6 +112,7 @@ updatesystemdb() {
|
||||
fi
|
||||
|
||||
# update glib schema
|
||||
msg2 "Updating glib schemas..."
|
||||
if [ -e /usr/share/glib-2.0/schemas ]; then
|
||||
if [ -x /usr/bin/glib-compile-schemas ]; then
|
||||
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas >/dev/null 2>&1
|
||||
@@ -116,6 +120,7 @@ updatesystemdb() {
|
||||
fi
|
||||
|
||||
# run ldconfig
|
||||
msg2 "Running ldconfig..."
|
||||
if [ -f /sbin/ldconfig ]; then
|
||||
/sbin/ldconfig
|
||||
fi
|
||||
|
||||
19
installpkg
19
installpkg
@@ -306,7 +306,18 @@ help() {
|
||||
echo -e "\t`basename $0` packagefile < options >"
|
||||
echo -e ""
|
||||
echo -e "Example:"
|
||||
echo -e "\t`basename $0` foobar-1.0-1.spkg.txz -u --no-backup"
|
||||
echo -e "\t`basename $0` foobar-1.0-1.spkg.txz -u --no-backup this will upgrade package foobar-1.0-1 without \n\t\t\t\t\t\t\t\tbackup its old configuration file"
|
||||
echo -e ""
|
||||
echo -e "Options:"
|
||||
echo -e "\t-u,\t--upgrade update package"
|
||||
echo -e "\t-r,\t--reinstall reinstall package"
|
||||
echo -e "\t-id,\t--ignore-dependency ignore dependency"
|
||||
echo -e "\t-ic,\t--ignore-conflict ignore conflict when installing package"
|
||||
echo -e "\t-v,\t--verbose verbose install process"
|
||||
echo -e "\t\t--no-preinstall skip preinstall script when build/install package"
|
||||
echo -e "\t\t--no-postinstall skip postinstall script after install package"
|
||||
|
||||
}
|
||||
|
||||
parse_options() {
|
||||
|
||||
@@ -374,6 +385,12 @@ main() {
|
||||
|
||||
loadconfigfile
|
||||
|
||||
### SHOW HELP ###
|
||||
if [ "$SHOW_HELP" ]; then
|
||||
help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
### CHECK IF PACKAGE IS VALID PACKAGE ###
|
||||
#if [ ! $(tar -tf "$PACKAGE_INFO" | grep ".pkginfo") ]; then
|
||||
#msg "${color_yellow}$PACKAGE_INFO${color_reset} is not package created by scratchpkg."
|
||||
|
||||
Reference in New Issue
Block a user