Compare commits

..

43 commits

Author SHA1 Message Date
8dedd0b7da Merge pull request 'APS release v0.0.8.1 codename: Cleveland' (#11) from Ohio2/aps:master into master
Reviewed-on: alnux/aps#11
2021-08-31 13:31:37 +01:00
Ohio2
696425afd9 bro what 2021-08-31 14:21:56 +02:00
Ohio2
869216d369 ok the bug will be fixed, once i change the build to cd insert cd. 2021-08-31 14:20:02 +02:00
Ohio2
8c7a5d0e3a uhhh 2021-08-29 13:26:05 +02:00
bfe974b185 Merge pull request 'Add user config and add sources file.' (#10) from Ohio2/aps:master into master
Reviewed-on: alnux/aps#10
2021-08-29 08:26:42 +01:00
Ohio2
3014cb3241 fix functions 2021-08-28 14:37:37 +02:00
Ohio2
4375e666ee did i not push something 2021-08-28 13:49:30 +02:00
Ohio2
d0cc9bd951 implement sources 2021-08-28 07:17:21 +02:00
Ohio2
2200e5bac6 APS update 2021-08-28 05:24:55 +02:00
Ohio2
c2d0c0a7a4 add list 2021-08-27 16:58:57 +02:00
Ohio2
cb46751b92 user config will now be read 2021-08-27 13:34:35 +02:00
e45205cb2f Merge pull request 'add debug and confirm' (#9) from Ohio2/aps:master into master
Reviewed-on: alnux/aps#9
2021-08-26 14:31:29 +01:00
Ohio2
61bcf710c0 uhh 2021-08-26 15:30:41 +02:00
Ohio2
c540598726 g 2021-08-26 15:17:56 +02:00
Ohio2
3967b897df trolld 2021-08-26 15:03:00 +02:00
Ohio2
64de631b3f add a suite of things 2021-08-26 12:13:29 +02:00
Ohio2
2ea5c8a809 add confirm 2021-08-25 16:28:01 +02:00
9623569a7d Merge pull request 'Add altools/sel, altools/repo, install.sh & add config file support.' (#8) from Ohio2/aps:master into master
Reviewed-on: alnux/aps#8
2021-08-25 12:46:00 +01:00
a718517dc7 what 2021-08-25 12:31:44 +01:00
Ohio2
5bcb0d1607 add config 2021-08-25 13:01:36 +02:00
Ohio2
b1ca212971 hippoz insisted on doing this so um 2021-08-25 12:21:03 +02:00
Ohio2
4223978465 tools/ does not exist 2021-08-25 11:45:35 +02:00
Ohio2
0eb142c4d6 remove whole line containing 123 when 123 is a package repo & its website is trololo.git/troll/repo 2021-08-25 11:43:35 +02:00
Ohio2
391795714b fix merge conflict 2021-08-25 11:39:48 +02:00
Ohio2
f473df35b6 lmfao 2021-08-25 11:37:56 +02:00
Ohio2
b8e8d9996a pcm 2021-08-25 06:44:51 +02:00
ed2c916609 i forgor 💀 2021-08-24 06:37:30 +01:00
Ohio2
6510fd4132 Add repo and install.sh 2021-08-24 07:32:32 +02:00
Ohio2
1ef353862d add the sel(ect) utility 2021-08-24 06:55:14 +02:00
62c9558d7c Merge pull request 'instead of /tmp/alroot we should use /var/tmp/alroot, /tmp for /var/tmp' (#7) from Ohio2/aps:master into master
Reviewed-on: alnux/aps#7
2021-08-07 20:18:34 +01:00
Ohio2
ba1b920608 ok changed 2021-08-07 21:16:53 +02:00
Ohio2
b23750f84a instead of /tmp/alroot we should use /mnt, /tmp for /var/tmp 2021-08-07 16:59:13 +02:00
hippoz
0216a7771f
make package manager friendlier and clean up code 2021-07-19 01:04:08 +03:00
hippoz
85e814aff0
automatically create payload folder 2021-07-18 20:27:09 +03:00
hippoz
1e8f5ea4f2 pass payload as install target to scripts 2021-07-04 18:42:12 +03:00
hippoz
26fb73344f remove unneeded functions, clean up code, and reduce number of lines 2021-07-03 19:56:28 +03:00
hippoz
1908130cca remove sh suffix from file and remove AL_ prefix for variables 2021-07-03 01:05:12 +03:00
2e7f3e6ece Update 'README.md' 2021-03-18 05:20:34 +02:00
hippoz
76e7125149
pass package path as argument for package scripts 2021-01-16 16:54:50 +02:00
hippoz
2ac9696aa9
pass install root as parameter to package scripts 2021-01-16 16:49:12 +02:00
hippoz
2d95b6cdcb make cleanup not verbose 2020-12-01 18:40:14 +02:00
hippoz
6a391efcd3 exit if lock file exists 2020-12-01 18:36:35 +02:00
ee0e1f5f86 Merge pull request 'Add locking' (#1) from hiimgoodpack/aps:master into master
Reviewed-on: alnux/aps#1
2020-11-29 23:24:30 +00:00
8 changed files with 299 additions and 232 deletions

View file

@ -1,3 +1,5 @@
# aps
the alnux package manager
(the code is completely and utterly horrible and i cant believe i actually wrote this lol)

18
altools/repo Executable file
View file

@ -0,0 +1,18 @@
#!/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 Executable file
View file

@ -0,0 +1,35 @@
#!/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

208
aps Executable file
View file

@ -0,0 +1,208 @@
#!/bin/sh
#################################
# Alnux Packaging System, #
# the package manager for Alnux #
#################################
if [ -f "$XDG_CONFIG_HOME/al/config" ]; then
. $XDG_CONFIG_HOME/al/config
elif [ -f "$HOME/.config/al/config" ]; then
. $HOME/.config/al/config
elif [ -f "/etc/al/config" ]; then
. /etc/al/config
else
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"
debug=off
fi
if [ ${debug} = on ]; then
set -x
fi
die() {
echo "aps: fatal: ${1}"
rm "${lock}"
exit 2
}
confirm(){
echo -ne "Are you sure? [Y/n] "
read prompt
if [[ ${prompt} = [nN] ]]; then
die "User said no. Exiting..."
elif [[ ${prompt} != [yY] ]]; then
die "User gave invalid input. Exiting..."
fi
}
run_package_script() {
{
if [ -x "${2}/${1}" ]; then
echo ":: Running ${1}"
#cd "${2}" || die "Could not enter package working directory. Exiting..."
"${2}/${1}" "${2}/payload" "${2}"
fi
}
}
install_local_package() {
[ ! -e "${1}" ] && die "File ${1} does not exist. Exiting..."
# Extract the package
confirm
echo ":: Installing package ${1}"
cp -prv "${1}" "${temp_location}"
pkg_name="${1%/}"
pkg_name="${pkg_name##*/}"
pkg_name=$(echo "${pkg_name}" | cut -f 1 -d '.')
pkg_path="${temp_location}/${pkg_name}"
cd "${pkg_path}" || die "Could not enter package path."
# Set default values for package
pkg_config_deploy=true
pkg_config_ver="0"
pkg_config_makedepends=""
pkg_config_depends=""
# Download sources.
if [ -f sources ]; then
pkg_config_sources=$(cat sources)
pkg_config_sources_to=$(echo ${pkg_config_sources} | sed 's:.*/::')
curl -# ${pkg_config_sources} -o ${pkg_config_sources_to}
mkdir pkg_bd
tar -xf 1 ${pkg_config_sources_to} -C ${pkg_path}
fi
# Install package
mkdir -p "${pkg_path}/payload"
. "${pkg_path}/package"
cd pkg_bd/
run_package_script "build" "${pkg_path}"
cd ../..
run_package_script "predeploy" "${pkg_path}"
# Deploy package
if [ "${pkg_config_deploy}" = true ]; then
echo ":: Deploying target ${pkg_name}..."
cp -rpv "${pkg_path}/payload"/* "${install_root}" > "${temp_location}/${pkg_name}-payloaddeploylog"
sed 's/^.*-> //' "${temp_location}/${pkg_name}-payloaddeploylog" | tr -d \'\" > "${temp_location}/${pkg_name}-payloadfiles"
rm "${temp_location}/${pkg_name}-payloaddeploylog"
fi
run_package_script "postdeploy" "${pkg_path}"
# Add package to database
if [ -x "${pkg_path}/package" ]; then
echo ":: Adding target ${pkg_name} to installed package database..."
[ ! -d "${installed_pkg_database}/${pkg_name}" ] && mkdir "${installed_pkg_database}/${pkg_name}"
cp -pv "${pkg_path}/package" "${installed_pkg_database}/${pkg_name}/package"
[ -e "${temp_location}/${pkg_name}-payloadfiles" ] && cp -pv "${temp_location}/${pkg_name}-payloadfiles" "${installed_pkg_database}/${pkg_name}/payloadfiles"
else
die "Target ${pkg_name} does not have a package script (it's an invalid package!). Exiting..."
fi
# Cleanup
rm -r "${pkg_path}"
rm "${temp_location}/${pkg_name}-payloadfiles"
cd "${install_root}" || die "Could not return to main directory. Exiting..."
unset pkg_path
unset pkg_name
unset pkg_config_deploy
unset pkg_config_ver
unset pkg_config_makedepends
unset pkg_config_depends
echo "[*] Install complete for package ${pkg_name}"
}
sync_deps(){
confirm
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() {
confirm
echo ":: Removing target ${1}..."
pkg_path="${installed_pkg_database}/${1}"
[ ! -d "${pkg_path}" ] && die "Package could not be found in local installed package database. Exiting..."
payloadfiles_path="${pkg_path}/payloadfiles"
[ ! -e "${payloadfiles_path}" ] && die "[E] Package ${1} does not have a payloadfiles file. Exiting..."
rm -rv "$(cat ${payloadfiles_path})"
rm -rv "${pkg_path}"
echo "[*] Removal complete for target ${pkg_name}"
}
sync_local_repo_database() {
echo ":: Syncing local database for repo ${1}"
if [ ! -d "${locpkg_database}/${1}" ]; then
# Local database for repo doesnt exists - clone it
git clone "${2}" "${locpkg_database}/${1}"
else
# Local database for repo already exists - sync it
cd "${locpkg_database}/${1}" || die "Could not enter local database directory. Exiting..."
git pull
fi
}
install_package_from_repo() { # NOTE(hippoz): This can get a tad confusing... ${1} is the repo and ${2} is the package
echo ":: Installing package ${2} from ${1} repo"
[ ! -d "${locpkg_database}/${1}/${2}" ] && die "Target not found."
install_local_package "${locpkg_database}/${1}/${2}"
}
upgrade() {
confirm
echo ":: Upgrading installed packages"
cd "${installed_pkg_database}" || die "Could not enter local installed package database directory. Exiting..."
for pkg in */; do
installed_pkg_path="${installed_pkg_database}/${pkg}"
. "${installed_pkg_path}/package"
pkg_name="${installed_pkg_path%/}"
pkg_name="${pkg_name##*/}"
already_installed_version=${pkg_config_ver}
[ ! -d "${locpkg_database}/${1}/${pkg_name}" ] && die "Package ${pkg_name} was not found in ${1}. Exiting..."
. "${locpkg_database}/${1}/${pkg_name}/package"
if [ ! "${already_installed_version}" = "${pkg_config_ver}" ]; then
echo ":: Updating package ${pkg_name} (out of date)"
install_package_from_repo "${1}" "${pkg_name}"
fi
unset pkg_config_deploy
unset pkg_config_ver
unset pkg_config_makedepends
unset pkg_config_depends
done
}
version(){
echo "Alnux APS v0.0.8.1"
}
help(){
echo "Alnux APS, the packaging system for Alnux."
echo ""
echo "sync - Synchronizes from package repository."
echo "install - Installs from local package information file and build file."
echo "upgrade - Upgrades from package repository."
echo "remove - Removes a package from /var/aps/installed and it's install files (payloadfiles)."
echo "list - Lists currently installed packages."
echo "help - Display this message."
echo "version - Display the version."
}
list(){
ls ${installed_pkg_database} | sed 's/^README.md//g'
}
main() {
if [ -f "${lock}" ]; then
echo "A lock file already exists (another instance of the package manager could be running). If you're sure no package manager is running, remove the file ${lock}."
exit 1
fi
touch "${lock}"
case ${1} in
install) install_local_package "${2}" ;;
remove) remove_local_package "${2}" ;;
#sync-dep)
# sync_local_repo_database "official" ${official}
# [ -z "${2}" ] && exit 0
# install_package_from_repo "official" "${2}" ;;
sync)
sync_local_repo_database "official" ${official}
[ -z "${2}" ] && exit 0
install_package_from_repo "official" "${2}" ;;
upgrade) upgrade "official" ;;
help) help ;;
version) version ;;
list) list ;;
*) die "Invalid option ${1}, exiting..." ;;
esac
rm "${lock}"
}
main "${1}" "${2}"

231
aps.sh
View file

@ -1,231 +0,0 @@
#!/bin/sh
AL_TEMP_LOCATION="/tmp"
AL_INSTALL_ROOT="/tmp/alroot"
AL_INSTALLED_PKG_DATABASE="${AL_INSTALL_ROOT}/var/aps/installed"
AL_LOCAL_PKG_DATABASE="${AL_INSTALL_ROOT}/var/aps/repos"
AL_LOCK="${AL_INSTALL_ROOT}/var/aps/lock"
# Repo config
official="https://git.hippoz.xyz/alnux/repo"
set_default_package_config_values() {
AL_PKG_CONFIG_DEPLOY=true
AL_PKG_CONFIG_VER="0.1"
AL_PKG_CONFIG_NAME="alnuxpackage"
AL_PKG_CONFIG_MAKEDEPENDS=""
AL_PKG_CONFIG_DEPENDS=""
}
unset_config_values() {
unset AL_PKG_CONFIG_DEPLOY
unset AL_PKG_CONFIG_VER
unset AL_PKG_CONFIG_NAME
unset AL_PKG_CONFIG_MAKEDEPENDS
unset AL_PKG_CONFIG_DEPENDS
}
load_installed_pkg_config() {
echo ":: Looking up package ${1} in local installed packages..."
set_default_package_config_values
if [ -d "${AL_INSTALLED_PKG_DATABASE}/${1}" ]; then
echo ":: Package ${1} was found, loading config..."
AL_PKG_NAME=${1}
AL_PKG_PACKAGE_PATH="${AL_INSTALLED_PKG_DATABASE}/${1}"
run_package_script "package"
else
echo "[E] Package ${1} was not found in the local installed package database, exiting..."
exit 1
fi
}
extract_package() {
echo "[*] Copying package ${1} into temporary location ${AL_TEMP_LOCATION}..."
#tar -xf "${1}" -C "${AL_TEMP_LOCATION}"
cp -prv "${1}" "${AL_TEMP_LOCATION}"
AL_PKG_NAME="${1%/}"
AL_PKG_NAME="${AL_PKG_NAME##*/}"
AL_PKG_NAME=$(echo "${AL_PKG_NAME}" | cut -f 1 -d '.')
cd "${AL_INSTALL_ROOT}"
AL_PKG_PACKAGE_PATH="${AL_TEMP_LOCATION}/${AL_PKG_NAME}"
set_default_package_config_values
}
add_package_to_database() {
if [ ! -d "${AL_INSTALLED_PKG_DATABASE}" ]; then
echo "[*] Package database folder not found, creating..."
mkdir -pv "${AL_INSTALLED_PKG_DATABASE}"
fi
if [ -x "${AL_PKG_PACKAGE_PATH}/package" ]; then
echo ":: Adding target ${AL_PKG_NAME} to installed package database..."
if [ ! -d "${AL_INSTALLED_PKG_DATABASE}/${AL_PKG_NAME}" ]; then
echo "[*] Package folder for ${AL_PKG_NAME} not found, creating..."
mkdir "${AL_INSTALLED_PKG_DATABASE}/${AL_PKG_NAME}"
fi
cp -pv "${AL_PKG_PACKAGE_PATH}/package" "${AL_INSTALLED_PKG_DATABASE}/${AL_PKG_NAME}/package"
if [ -e "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloadfiles" ]; then
cp -pv "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloadfiles" "${AL_INSTALLED_PKG_DATABASE}/${AL_PKG_NAME}/payloadfiles"
fi
else
echo "[*] Target ${AL_PKG_NAME} does not have a package script and will not be added to the installed package database"
fi
}
run_package_script() {
if [ -x "${AL_PKG_PACKAGE_PATH}/${1}" ]; then
echo ":: Running ${1} script for target ${AL_PKG_NAME}..."
. "${AL_PKG_PACKAGE_PATH}/${1}"
fi
}
deploy_package_payload() {
if [ "${AL_PKG_CONFIG_DEPLOY}" = true ]; then
echo ":: Deploying target ${AL_PKG_NAME}..."
cp -rpv "${AL_PKG_PACKAGE_PATH}/payload"/* "${AL_INSTALL_ROOT}" > "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloaddeploylog"
sed 's/^.*-> //' "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloaddeploylog" | tr -d \'\" > "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloadfiles"
rm "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloaddeploylog"
fi
}
install_extracted_package() {
run_package_script "package"
run_package_script "build"
run_package_script "predeploy"
deploy_package_payload
run_package_script "postdeploy"
echo "[*] Install complete for target ${AL_PKG_NAME}"
}
extract_cleanup() {
echo "[*] Cleaning up after target ${AL_PKG_NAME}..."
rm -rv "${AL_PKG_PACKAGE_PATH}"
rm -v "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloadfiles"
unset AL_PKG_PACKAGE_PATH
unset AL_PKG_NAME
unset_config_values
cd "${AL_INSTALL_ROOT}"
}
install_local_package() {
if [ ! -e "${1}" ]; then
echo "[E] File ${1} does not exist, exiting..."
exit 1
fi
extract_package "${1}"
install_extracted_package
add_package_to_database
extract_cleanup
}
remove_local_package() {
load_installed_pkg_config "${1}"
PAYLOADFILES_PATH="${AL_PKG_PACKAGE_PATH}/payloadfiles"
if [ ! -e "${PAYLOADFILES_PATH}" ]; then
echo "[E] Package ${1} does not have a payloadfiles file. Exiting..."
exit 0
fi
echo ":: Removing target ${1}..."
rm -rv $(<${PAYLOADFILES_PATH})
rm -rv ${AL_PKG_PACKAGE_PATH}
echo "[*] Removal complete for target ${AL_PKG_NAME}"
}
sync_local_repo_database() {
echo ":: Syncing local database for repo ${1}..."
if [ ! -d "${AL_LOCAL_PKG_DATABASE}/${1}" ]; then
echo ":: Local database for repo ${1} does not exist, cloning..."
git clone "${2}" "${AL_LOCAL_PKG_DATABASE}/${1}"
else
echo ":: Local database for repo ${1} exists, updating..."
cd "${AL_LOCAL_PKG_DATABASE}/${1}"
git pull
fi
}
install_package_from_repo() { # NOTE(hippoz): This can get a tad confusing... ${1} is the repo and ${2} is the package
echo ":: Installing package ${2} from ${1} repo"
if [ ! -d "${AL_LOCAL_PKG_DATABASE}/${1}/${2}" ]; then
echo "[E] Package ${2} was not found in ${1}, exiting..."
exit 1
else
install_local_package "${AL_LOCAL_PKG_DATABASE}/${1}/${2}"
fi
}
upgrade() {
echo ":: Upgrading installed packages..."
unset_config_values
cd "${AL_INSTALLED_PKG_DATABASE}"
for pkg in */; do
INSTALLED_PKG_PATH="${AL_INSTALLED_PKG_DATABASE}/${pkg}"
. ${INSTALLED_PKG_PATH}/package
AL_PKG_NAME="${INSTALLED_PKG_PATH%/}"
AL_PKG_NAME="${AL_PKG_NAME##*/}"
ALREADY_INSTALLED_VERSION=${AL_PKG_CONFIG_VER}
if [ ! -d "${AL_LOCAL_PKG_DATABASE}/${1}/${AL_PKG_NAME}" ]; then
echo "[E] Package ${AL_PKG_NAME} was not found in ${1}, exiting..."
exit 1
else
. "${AL_LOCAL_PKG_DATABASE}/${1}/${AL_PKG_NAME}/package"
fi
if [ ! "${ALREADY_INSTALLED_VERSION}" = "${AL_PKG_CONFIG_VER}" ]; then
echo ":: Package ${AL_PKG_NAME} is out of date, updating..."
install_package_from_repo "${1}" "${AL_PKG_NAME}"
fi
unset_config_values
done
}
main() {
if [ -f "${AL_LOCK}" ]; then
echo "[E] A lock file already exists."
echo " If you're sure no package manager is running,"
echo " remove the file ${AL_LOCK}"
fi
touch "${AL_LOCK}"
case ${1} in
install)
install_local_package "${2}"
;;
remove)
remove_local_package "${2}"
;;
sync)
sync_local_repo_database "official" ${official}
if [ -z "${2}" ]; then
echo "[*] No targets specified."
else
install_package_from_repo "official" "${2}"
fi
;;
upgrade)
upgrade "official"
;;
*)
echo "[E] Invalid option ${1}, exiting..."
rm "${AL_LOCK}"
exit 0
;;
esac
rm "${AL_LOCK}"
}
main "${1}" "${2}"

12
config/config Executable file
View file

@ -0,0 +1,12 @@
##########################
# A config file for the #
# Alnux Packaging System #
##########################
temp_location="/var/tmp"
install_root="/"
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"
debug=off

23
install.sh Executable file
View file

@ -0,0 +1,23 @@
#!/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
export install_root=${prefix}
./aps sync alnux
install -v aps ${prefix}/usr/bin/ &&
install -v altools/sel ${prefix}/usr/bin/ &&
install -v altools/repo ${prefix}/usr/bin/ &&
install -v config/config ${prefix}/etc/al &&
install -v -Dm644 man/aps.8.gz ${prefix}/usr/share/man/man8/
fi

BIN
man/aps.8.gz Normal file

Binary file not shown.