mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-02-06 09:26:35 +00:00
updated
This commit is contained in:
34
installpkg
34
installpkg
@@ -65,23 +65,29 @@ installpkg() {
|
||||
fi
|
||||
|
||||
#installing package into system
|
||||
msg2 "Extracting package..."
|
||||
if [ "$VERBOSE_INSTALL" ]; then
|
||||
tar --keep-directory-symlink --no-overwrite-dir -p -x -v -f $PKGNAME -C $ROOT_DIR --exclude=.pkginfo --exclude=.pkginstall --exclude=.pkgreadme ${excludefile[@]}
|
||||
if [[ $(tar -tf "$PKGNAME") ]]; then
|
||||
msg2 "Extracting package..."
|
||||
if [ "$VERBOSE_INSTALL" ]; then
|
||||
tar --keep-directory-symlink --no-overwrite-dir -p -x -v -f $PKGNAME -C $ROOT_DIR --exclude=.pkginfo --exclude=.pkginstall --exclude=.pkgreadme ${excludefile[@]}
|
||||
else
|
||||
tar --keep-directory-symlink --no-overwrite-dir -p -x -f $PKGNAME -C $ROOT_DIR --exclude=.pkginfo --exclude=.pkginstall --exclude=.pkgreadme ${excludefile[@]}
|
||||
fi
|
||||
else
|
||||
tar --keep-directory-symlink --no-overwrite-dir -p -x -f $PKGNAME -C $ROOT_DIR --exclude=.pkginfo --exclude=.pkginstall --exclude=.pkgreadme ${excludefile[@]}
|
||||
msgerr "Package is corrupted. Aborted!"
|
||||
spkglock
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
msgerr "Failed install ${color_red}$packagename${color_reset}."
|
||||
while IFS=' ' read -r line; do
|
||||
pushd $ROOT_DIR
|
||||
rm_silent "$line" || rmdir_silent --ignore-fail-on-non-empty "$line"
|
||||
popd
|
||||
done < <(tar -tf "$PKGNAME" --exclude=.pkginfo --exclude=.pkginstall --exclude=.pkgreadme ${excludefile[@]} | tac)
|
||||
spkglock
|
||||
exit 1
|
||||
fi
|
||||
if [ $? != 0 ]; then
|
||||
msgerr "Failed install ${color_red}$packagename${color_reset}."
|
||||
while IFS=' ' read -r line; do
|
||||
pushd $ROOT_DIR
|
||||
rm_silent "$line" || rmdir_silent --ignore-fail-on-non-empty "$line"
|
||||
popd
|
||||
done < <(tar -tf "$PKGNAME" --exclude=.pkginfo --exclude=.pkginstall --exclude=.pkgreadme ${excludefile[@]} | tac)
|
||||
spkglock
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then
|
||||
removeoldfiles
|
||||
|
||||
2
scratch
2
scratch
@@ -91,7 +91,7 @@ searchpkg() {
|
||||
popd
|
||||
if [ ! -z "$name" ] && [ ! -z "$version" ] && [ ! -z "$release" ]; then
|
||||
portname=$(basename $port)
|
||||
search_result="${color_gray}($portname)${color_reset} ${color_purple}$name${color_reset} ${color_cyan}$version-$release${color_reset}"
|
||||
search_result="${color_blue}($portname)${color_reset} ${color_purple}$name${color_reset} ${color_cyan}$version-$release${color_reset}"
|
||||
if [ -d $INDEX_DIR/$name ]; then
|
||||
getinstalledname $name
|
||||
if [ "$name-$version-$release" = "$installedname" ]; then
|
||||
|
||||
Reference in New Issue
Block a user