Compare commits
No commits in common. "9623569a7dec7f43f949f9d89b5a9062ead2552b" and "62c9558d7ca3c9eaad0c6545e8892bfdc31dcbba" have entirely different histories.
9623569a7d
...
62c9558d7c
5 changed files with 6 additions and 102 deletions
18
altools/repo
18
altools/repo
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
########################################
|
|
||||||
# Repo, a repository manager for alnux #
|
|
||||||
########################################
|
|
||||||
. /etc/al/config
|
|
||||||
case $1 in
|
|
||||||
# add a repo
|
|
||||||
add) git clone https://${3}/${2}.git ${install_root}/var/aps/repos/${2}
|
|
||||||
echo "${2}" >> ${install_root}/etc/al/repo.conf
|
|
||||||
;;
|
|
||||||
# update a repo
|
|
||||||
update) pushd && cd ${install_root}/var/aps/repos/${2} && git pull && popd ;;
|
|
||||||
# destroy a repo (remove)
|
|
||||||
destroy) rm -rfv ${install_root}/var/aps/repos/${2}
|
|
||||||
sed -i "/^${2}/d" ${install_root}/etc/al/repo.conf
|
|
||||||
;;
|
|
||||||
esac
|
|
35
altools/sel
35
altools/sel
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#########################
|
|
||||||
# Alnux sel(ect) Script #
|
|
||||||
#########################
|
|
||||||
. /etc/al/config
|
|
||||||
if [ -f "${install_root}/etc/al/lnver" ]; then
|
|
||||||
. /etc/al/lnver.cfg
|
|
||||||
fi
|
|
||||||
case $1 in
|
|
||||||
linux) case $2 in
|
|
||||||
# Lists all kernels
|
|
||||||
list) ls ${install_root}/usr/src/ | grep 'linux' &&
|
|
||||||
ls -L ${install_root}/usr/src/linux 2>/dev/null
|
|
||||||
;;
|
|
||||||
# Sets a kernel version
|
|
||||||
set) lnver=${3}
|
|
||||||
echo "lnver=${3}" > ${install_root}/etc/al/lnver.cfg
|
|
||||||
;;
|
|
||||||
# Links the set kernel version.
|
|
||||||
link) ln -sv ${install_root}/usr/src/linux-${lnver} ${install_root}/usr/src/linux &&
|
|
||||||
mkdir -pv ${install_root}/var/aps/packages/linux/ &&
|
|
||||||
echo "/boot/vmlinuz-linux-${lnver}" > ${install_root}/var/aps/packages/linux/payloadfiles &&
|
|
||||||
echo "/usr/src/${lnver}" >> ${install_root}/var/aps/packages/linux/payloadfiles &&
|
|
||||||
echo "pkg_config_deploy=true" > ${install_root}/var/aps/packages/linux/package &&
|
|
||||||
echo "pkg_config_ver='${lnver}'" >> ${install_root}/var/aps/packages/linux/package &&
|
|
||||||
echo "pkg_config_name='linux'" >> ${install_root}/var/aps/packages/linux/package &&
|
|
||||||
echo "pkg_config_makedepends=''" >> ${install_root}/var/aps/packages/linux/package &&
|
|
||||||
echo "pkg_config_depends=''" >> ${install_root}/var/aps/packages/linux/package
|
|
||||||
|
|
||||||
;;
|
|
||||||
# Destroys the symlink.
|
|
||||||
destroy) rm -rfv ${install_root}/usr/src/linux ;;
|
|
||||||
esac
|
|
||||||
esac
|
|
23
aps
Executable file → Normal file
23
aps
Executable file → Normal file
|
@ -1,14 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -f "/etc/al/config" ]; then
|
temp_location="/var/tmp"
|
||||||
. /etc/al/config
|
install_root="/var/tmp/alroot"
|
||||||
else
|
installed_pkg_database="${install_root}/var/aps/installed"
|
||||||
temp_location="/var/tmp"
|
locpkg_database="${install_root}/var/aps/repos"
|
||||||
install_root="/var/tmp/alroot"
|
lock="${install_root}/var/aps/lock"
|
||||||
installed_pkg_database="${install_root}/var/aps/installed"
|
official="https://git.hippoz.xyz/alnux/repo"
|
||||||
locpkg_database="${install_root}/var/aps/repos"
|
|
||||||
lock="${install_root}/var/aps/lock"
|
|
||||||
official="https://git.hippoz.xyz/alnux/repo"
|
|
||||||
fi
|
|
||||||
die() {
|
die() {
|
||||||
echo "aps: fatal: ${1}"
|
echo "aps: fatal: ${1}"
|
||||||
rm "${lock}"
|
rm "${lock}"
|
||||||
|
@ -72,13 +68,6 @@ install_local_package() {
|
||||||
unset pkg_config_depends
|
unset pkg_config_depends
|
||||||
echo "[*] Install complete for package ${pkg_name}"
|
echo "[*] Install complete for package ${pkg_name}"
|
||||||
}
|
}
|
||||||
sync_deps(){
|
|
||||||
echo ":: Syncing dependencies for ${1}"
|
|
||||||
install_package_from_repo "${pkg_makedepends}"
|
|
||||||
install_package_from_repo "${pkg_deps}"
|
|
||||||
echo "[*] Install dependencies for ${1}"
|
|
||||||
|
|
||||||
}
|
|
||||||
remove_local_package() {
|
remove_local_package() {
|
||||||
echo ":: Removing target ${1}..."
|
echo ":: Removing target ${1}..."
|
||||||
pkg_path="${installed_pkg_database}/${1}"
|
pkg_path="${installed_pkg_database}/${1}"
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
##########################
|
|
||||||
# A config file for the #
|
|
||||||
# Alnux Packaging System #
|
|
||||||
##########################
|
|
||||||
temp_location="/var/tmp"
|
|
||||||
install_root="/var/tmp/alroot"
|
|
||||||
installed_pkg_database="${install_root}/var/aps/installed"
|
|
||||||
locpkg_database="${install_root}/var/aps/repos"
|
|
||||||
lock="${install_root}/var/aps/lock"
|
|
||||||
official="https://git.hippoz.xyz/alnux/repo"
|
|
21
install.sh
21
install.sh
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
##########################
|
|
||||||
# INSTALL SCRIPT FOR APS #
|
|
||||||
##########################
|
|
||||||
case $1 in
|
|
||||||
--prefix) prefix=$2 ;;
|
|
||||||
*) prefix=/
|
|
||||||
esac
|
|
||||||
if [ ${prefix} == / ]; then
|
|
||||||
if [ $(whoami) != root ]; then
|
|
||||||
echo '[E] You must run as root!'
|
|
||||||
kill 2
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
install -v aps ${prefix}/usr/bin/ &&
|
|
||||||
install -v altools/sel ${prefix}/usr/bin/ &&
|
|
||||||
install -v altools/repo ${prefix}/usr/bin/ &&
|
|
||||||
${prefix}/usr/bin/aps sync alnux &&
|
|
||||||
install -v config/config /etc/al
|
|
||||||
fi
|
|
Loading…
Reference in a new issue