New generic install method

This commit is contained in:
2023-03-21 14:15:58 -04:00
parent d7e52af956
commit 1339921844

View File

@@ -373,9 +373,9 @@ init() {
PKG_INSTALL_LOCAL(){ installMCARCH; } PKG_INSTALL_LOCAL(){ installMCARCH; }
;; ;;
unknown) unknown)
PKG_INSTALL=("#") PKG_INSTALL=(":")
PKG_REMOVE=("#") PKG_REMOVE=(":")
PKG_UPDATE=("#") PKG_UPDATE=(":")
PKG_INSTALL_LOCAL(){ installMCGENERIC; } PKG_INSTALL_LOCAL(){ installMCGENERIC; }
esac esac
} }
@@ -865,11 +865,11 @@ installMCGENERIC() {
declare extract_dir && extract_dir="$(mktemp -d)" declare extract_dir && extract_dir="$(mktemp -d)"
pushd "$extract_dir" &>/dev/null || return pushd "$extract_dir" &>/dev/null || return
ar x "$MCDEB" execute ar x "$MCDEB"
tar xvf "control.tar.xz" execute tar xvf "control.tar.xz"
echo "You must install the following dependencies manually:" echo "You must install the following dependencies manually:"
grep -i "Depends:" control grep -i "Depends:" control
tar xvf "data.tar.xz" execute tar xvf "data.tar.xz"
# List of files to install # List of files to install
raw_files=("$(find etc/ usr/ -mindepth 1 -type f)") raw_files=("$(find etc/ usr/ -mindepth 1 -type f)")
# Output to log file # Output to log file
@@ -878,7 +878,7 @@ installMCGENERIC() {
done done
# Manually install files # Manually install files
for f in "${raw_files[@]}"; do for f in "${raw_files[@]}"; do
sudo cp -a "$f" / execute sudo cp -a "$f" /
done done
popd &>/dev/null || return popd &>/dev/null || return
execute rm -rf "$extract_dir" execute rm -rf "$extract_dir"