87 lines
2.0 KiB
Bash
87 lines
2.0 KiB
Bash
#!/usr/bin/env zsh
|
|
#
|
|
# Copyright (c) 2016 Dyne.org Foundation
|
|
# libdevuansdk is written and maintained by
|
|
# Jaromil <jaromil@dyne.org>
|
|
# KatolaZ <katolaz@freaknet.org>
|
|
# parazyd <parazyd@dyne.org>
|
|
#
|
|
# This file is part of libdevuansdk
|
|
#
|
|
# This source code is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This software is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
devuan_sdk_version=0.1
|
|
|
|
setopt pushdsilent
|
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
|
|
|
|
SDK_PREFIX=`pwd`
|
|
SDK_HOME=`pwd`
|
|
SDK_CONF=`pwd`
|
|
|
|
R=${SDK_PREFIX:-/usr/local/devuan-sdk}
|
|
H=${SDK_HOME:-$HOME/.devuan-sdk}
|
|
E=${SDK_CONF:-/etc/devuan-sdk}
|
|
|
|
[[ -r $R ]] || {
|
|
print "Devuan SDK is not installed in: $R"
|
|
print "export SDK_PREFIX if installed on a different path"
|
|
}
|
|
|
|
|
|
########################
|
|
## Load Zuper extensions
|
|
# conclude initialization
|
|
if [[ -r $R/zuper/zuper ]]; then
|
|
source $R/zuper/zuper
|
|
else source ./zuper/zuper; fi
|
|
|
|
DEBUG=${DEBUG:-0}
|
|
QUIET=${QUIET:-0}
|
|
LOG=${LOG:-""}
|
|
|
|
# path and debugging
|
|
vars+=(R H E)
|
|
|
|
# source $R/zlibs/library
|
|
source $E/config
|
|
source $R/zlibs/debootstrap
|
|
source $R/zlibs/helpers
|
|
source $R/zlibs/imaging
|
|
source $R/zlibs/iso
|
|
source $R/zlibs/sysconf
|
|
|
|
|
|
# conclude initialization
|
|
if [[ -r $R/zuper/zuper.init ]]; then
|
|
source $R/zuper/zuper.init
|
|
else source ./zuper/zuper.init; fi
|
|
|
|
# add all other binaries to the path
|
|
path+=($R/bin)
|
|
rehash
|
|
|
|
|
|
# For gettext
|
|
TEXTDOMAIN=devuan
|
|
|
|
# create mandatory workdirs
|
|
mkdir -p ${strapdir}
|
|
|
|
notice "Loading Devuan SDK library v$devuan_sdk_version"
|
|
|
|
# ...
|
|
|
|
act "library succesfully loaded"
|