Compare commits

..

4 Commits

3 changed files with 42 additions and 17 deletions

View File

@@ -78,7 +78,7 @@ from_arch(){
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
local package=${TREE_DIR_ARCH}/$git_tree_arch/$pkg
local repo=$(find_repo "$package")
local repo=$(find_repo "$package" "${staging}" "${unstable}")
src=$package/repos/$repo
@@ -114,7 +114,7 @@ view_build(){
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
local pkg_path=${TREE_DIR_ARCH}/$git_tree_arch/$pkg
local repo=$(find_repo "$pkg_path")
local repo=$(find_repo "$pkg_path" "${staging}" "${unstable}")
src=$pkg_path/repos/$repo
@@ -139,6 +139,8 @@ import=false
view=false
createnew=false
conf=false
unstable=false
staging=true
PACKAGE=''
@@ -157,6 +159,8 @@ usage() {
echo " -y Don't clone or pull artix repos"
echo ' -i Import a package from arch repos'
echo ' -n Make new remote subrepo and clone it'
echo ' -u Include kde & gnome unstable (only with -i)'
echo ' -w Exclude staging (only with -i)'
echo ' -v View package depends'
echo ' -h This help'
echo ''
@@ -166,7 +170,7 @@ usage() {
orig_argv=("$0" "$@")
opts='p:t:g:sinzyvh'
opts='p:t:g:uwsinzyvh'
while getopts "${opts}" arg; do
case "${arg}" in
@@ -178,6 +182,8 @@ while getopts "${opts}" arg; do
y) sync_artix=false ;;
i) import=true ;;
n) createnew=true ;;
w) staging=false ;;
u) unstable=true ;;
v) view=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;

View File

@@ -15,6 +15,22 @@
. @libdir@/artools/util-base.sh
. @libdir@/artools/util-pkg.sh
get_path(){
local repo="$1" pkg=trunk/PKGBUILD
if [[ $repo != trunk ]]; then
[[ -f repos/$repo-${ARCH}/PKGBUILD ]] && pkg=repos/$repo-${ARCH}/PKGBUILD
[[ -f repos/$repo-any/PKGBUILD ]] && pkg=repos/$repo-any/PKGBUILD
fi
echo $pkg
}
prepare_commit(){
local dest="$1"
[[ -d repos/$dest ]] && git rm -r repos/$dest
[[ ! -d repos ]] && mkdir repos
[[ ! -d repos/$dest ]] && mkdir repos/$dest
}
commit_pkg(){
local git_tree=$(find_tree "${TREE_DIR_ARTIX}" "${PACKAGE}")
if [[ -n ${git_tree} ]];then
@@ -25,9 +41,13 @@ commit_pkg(){
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
. trunk/PKGBUILD
local pkgbuild=$(get_path "${REPO_SRC}")
. $pkgbuild
[[ $arch == 'any' ]] && CARCH=any
local ver=$(get_full_version "${PACKAGE}")
local version=$(get_full_version)
local commit_msg=""
if ${remove};then
@@ -36,14 +56,14 @@ commit_pkg(){
local pkg=${PACKAGE}
git rm -r trunk
else
local pkg="${PACKAGE}-$ver"
local pkg="${PACKAGE}-$version"
git rm -r repos/"${REPO_SRC}-$CARCH"
fi
commit_msg="[${REPO_SRC}] '$pkg' ${action}"
msg "Action: %s" "$commit_msg"
else
local action='modify'
commit_msg="[${REPO_SRC}] '${PACKAGE}-$ver' ${action}"
commit_msg="[${REPO_SRC}] '${PACKAGE}-$version' ${action}"
msg "Action: %s" "$commit_msg"
git add .
@@ -76,17 +96,18 @@ symlink_commit_pkg(){
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
. trunk/PKGBUILD
local pkgbuild=$(get_path "${REPO_SRC}")
. $pkgbuild
[[ $arch == 'any' ]] && CARCH=any
local ver=$(get_full_version "${PACKAGE}")
local version=$(get_full_version)
if [[ ${REPO_SRC} == 'trunk' ]];then
local action='add'
local dest="${REPO_DEST}-$CARCH"
[[ -d repos/$dest ]] && git rm -r repos/$dest
[[ ! -d repos ]] && mkdir repos
[[ ! -d repos/$dest ]] && mkdir repos/$dest
prepare_commit "$dest"
cp trunk/* repos/$dest/
else
@@ -94,14 +115,12 @@ symlink_commit_pkg(){
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
[[ -d repos/$dest ]] && git rm -r repos/$dest
[[ ! -d repos ]] && mkdir repos
[[ ! -d repos/$dest ]] && mkdir repos/$dest
prepare_commit "$dest"
cp repos/$src/* repos/$dest/
git rm -r repos/$src
fi
local commit_msg="[${REPO_SRC}] -> [${REPO_DEST}] '${PACKAGE}-$ver' ${action}"
local commit_msg="[${REPO_SRC}] -> [${REPO_DEST}] '${PACKAGE}-$version' ${action}"
msg "Action: %s" "$commit_msg"
git add .

View File

@@ -153,9 +153,9 @@ configure_calamares(){
msg2 "Configuring Calamares"
write_users_conf > "$mods"/users.conf
write_servicescfg_conf > "$mods"/services-"${INITSYS}".conf
[[ -z ${DESKTOP_LIST} ]] && write_unpackfs_conf > "$mods"/unpackfs.conf
sed -e "s|openrc|${INITSYS}|" -i "$mods"/postcfg.conf
sed -e "s|services-openrc|services-${INITSYS}|" -i "$1"/etc/calamares/settings.conf
[[ -z ${DESKTOP_LIST} ]] && write_unpackfs_conf > "$mods"/unpackfs.conf
fi
}