slight package manager and mirror modifications...

This commit is contained in:
Chris Dorman 2020-11-28 03:13:38 +08:00
parent d7f2643af7
commit 4d95bd23ca
2 changed files with 16 additions and 19 deletions

View File

@ -2,7 +2,7 @@
### Thaw ###
#
# Freon Linux package manager
# (C) Chris Dorman, 2017 LGPLv2
# (C) Chris Dorman, 2017-2020 LGPLv2
#
### END ####
@ -13,9 +13,9 @@
# Nutrapak root
THAWROOT="/share/thaw"
# Package list
PKGLIST="/share/thaw/info.lst"
PKGLIST="/share/thaw/package.list"
# Package list name (could change in the future)
PKGLISTNAME="info.lst"
PKGLISTNAME="package.list"
# Mirror file
MIRRORFILE="/share/thaw/mirror.txt"
# TCZ mount point
@ -62,8 +62,8 @@ case $1 in
fi
if [ ! -d $TMPPATH/$2 ]; then
mkdir $TMPPATH/$2
fi
mkdir $TMPPATH/$2
fi
# Check to see if package exists, if so download
echo "Checking ${2}'s existence... "
@ -72,15 +72,20 @@ case $1 in
echo ""
echo "Downloading ${2}..."
wget $(cat $MIRRORFILE)/$2.tcz -P $TMPPATH/$2
wget $(cat $MIRRORFILE)/$2.tcz.dep -P $TMPPATH/$2
wget $(cat $MIRRORFILE)/$2.tgz -P $TMPPATH/
else
echo "${2} was not found in repository."
exit 1
fi
# Extract the downloaded file
echo -n "Extracting package to tmp... "
tar -xzf $TMPPATH/$2.tgz -C $TMPPATH/$2/
status
# Examine dependencies for package
if [ -f "$TMPPATH/$2/$2.tcz.dep" ]; then
if [ -f "$TMPPATH/$2/$2.deps" ]; then
i=1
echo ""
echo "++++++++++++++++++++++++++++++++++++++++"
@ -101,24 +106,16 @@ case $1 in
echo "${line} already installed"
else
echo "Installing ${line} for ${2}"
thaw get-install ${line%.tcz}
thaw get-install ${line%.tgz}
fi
done < $TMPPATH/$2/$2.tcz.dep
echo "++++++++++++++++++++++++++++++++++++++++"
fi
echo -n "Extracting package to tmp... "
mount -o loop $TMPPATH/$2/$2.tcz $TCZMOUNT
status_serious
echo -n "Installing ${2}..."
if [ -f "$TMPPATH/$2/$2.tcz.dep" ]; then
rm $TMPPATH/$2/$2.tcz.dep
fi
cp -av $TCZMOUNT/* /
cp -av $TMPPATH/$2/ /
status_serious
#if [ -f "$TMPPATH/$2/execute.sh" ]; then

View File

@ -1 +1 @@
http://cddo.cf/freon/files/packages
http://www.freonlinux.com/files/packages