forked from artix/artools
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
685992cca3 | |||
816e13895f | |||
6a3f48f181 | |||
b4d9195c03 |
@@ -78,7 +78,7 @@ from_arch(){
|
|||||||
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
||||||
|
|
||||||
local package=${TREE_DIR_ARCH}/$git_tree_arch/$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
|
src=$package/repos/$repo
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ view_build(){
|
|||||||
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
|
||||||
|
|
||||||
local pkg_path=${TREE_DIR_ARCH}/$git_tree_arch/$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
|
src=$pkg_path/repos/$repo
|
||||||
|
|
||||||
@@ -139,6 +139,8 @@ import=false
|
|||||||
view=false
|
view=false
|
||||||
createnew=false
|
createnew=false
|
||||||
conf=false
|
conf=false
|
||||||
|
unstable=false
|
||||||
|
staging=true
|
||||||
|
|
||||||
PACKAGE=''
|
PACKAGE=''
|
||||||
|
|
||||||
@@ -157,6 +159,8 @@ usage() {
|
|||||||
echo " -y Don't clone or pull artix repos"
|
echo " -y Don't clone or pull artix repos"
|
||||||
echo ' -i Import a package from arch repos'
|
echo ' -i Import a package from arch repos'
|
||||||
echo ' -n Make new remote subrepo and clone it'
|
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 ' -v View package depends'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
echo ''
|
echo ''
|
||||||
@@ -166,7 +170,7 @@ usage() {
|
|||||||
|
|
||||||
orig_argv=("$0" "$@")
|
orig_argv=("$0" "$@")
|
||||||
|
|
||||||
opts='p:t:g:sinzyvh'
|
opts='p:t:g:uwsinzyvh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
@@ -178,6 +182,8 @@ while getopts "${opts}" arg; do
|
|||||||
y) sync_artix=false ;;
|
y) sync_artix=false ;;
|
||||||
i) import=true ;;
|
i) import=true ;;
|
||||||
n) createnew=true ;;
|
n) createnew=true ;;
|
||||||
|
w) staging=false ;;
|
||||||
|
u) unstable=true ;;
|
||||||
v) view=true ;;
|
v) view=true ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||||
|
@@ -15,6 +15,22 @@
|
|||||||
. @libdir@/artools/util-base.sh
|
. @libdir@/artools/util-base.sh
|
||||||
. @libdir@/artools/util-pkg.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(){
|
commit_pkg(){
|
||||||
local git_tree=$(find_tree "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
local git_tree=$(find_tree "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
||||||
if [[ -n ${git_tree} ]];then
|
if [[ -n ${git_tree} ]];then
|
||||||
@@ -25,9 +41,13 @@ commit_pkg(){
|
|||||||
|
|
||||||
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
|
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
|
||||||
|
|
||||||
. trunk/PKGBUILD
|
local pkgbuild=$(get_path "${REPO_SRC}")
|
||||||
|
|
||||||
|
. $pkgbuild
|
||||||
[[ $arch == 'any' ]] && CARCH=any
|
[[ $arch == 'any' ]] && CARCH=any
|
||||||
local ver=$(get_full_version "${PACKAGE}")
|
|
||||||
|
local version=$(get_full_version)
|
||||||
|
|
||||||
local commit_msg=""
|
local commit_msg=""
|
||||||
|
|
||||||
if ${remove};then
|
if ${remove};then
|
||||||
@@ -36,14 +56,14 @@ commit_pkg(){
|
|||||||
local pkg=${PACKAGE}
|
local pkg=${PACKAGE}
|
||||||
git rm -r trunk
|
git rm -r trunk
|
||||||
else
|
else
|
||||||
local pkg="${PACKAGE}-$ver"
|
local pkg="${PACKAGE}-$version"
|
||||||
git rm -r repos/"${REPO_SRC}-$CARCH"
|
git rm -r repos/"${REPO_SRC}-$CARCH"
|
||||||
fi
|
fi
|
||||||
commit_msg="[${REPO_SRC}] '$pkg' ${action}"
|
commit_msg="[${REPO_SRC}] '$pkg' ${action}"
|
||||||
msg "Action: %s" "$commit_msg"
|
msg "Action: %s" "$commit_msg"
|
||||||
else
|
else
|
||||||
local action='modify'
|
local action='modify'
|
||||||
commit_msg="[${REPO_SRC}] '${PACKAGE}-$ver' ${action}"
|
commit_msg="[${REPO_SRC}] '${PACKAGE}-$version' ${action}"
|
||||||
msg "Action: %s" "$commit_msg"
|
msg "Action: %s" "$commit_msg"
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
@@ -76,17 +96,18 @@ symlink_commit_pkg(){
|
|||||||
|
|
||||||
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
|
cd ${TREE_DIR_ARTIX}/${git_tree}/${PACKAGE}
|
||||||
|
|
||||||
. trunk/PKGBUILD
|
local pkgbuild=$(get_path "${REPO_SRC}")
|
||||||
|
|
||||||
|
. $pkgbuild
|
||||||
[[ $arch == 'any' ]] && CARCH=any
|
[[ $arch == 'any' ]] && CARCH=any
|
||||||
local ver=$(get_full_version "${PACKAGE}")
|
|
||||||
|
local version=$(get_full_version)
|
||||||
|
|
||||||
if [[ ${REPO_SRC} == 'trunk' ]];then
|
if [[ ${REPO_SRC} == 'trunk' ]];then
|
||||||
local action='add'
|
local action='add'
|
||||||
local dest="${REPO_DEST}-$CARCH"
|
local dest="${REPO_DEST}-$CARCH"
|
||||||
|
|
||||||
[[ -d repos/$dest ]] && git rm -r repos/$dest
|
prepare_commit "$dest"
|
||||||
[[ ! -d repos ]] && mkdir repos
|
|
||||||
[[ ! -d repos/$dest ]] && mkdir repos/$dest
|
|
||||||
|
|
||||||
cp trunk/* repos/$dest/
|
cp trunk/* repos/$dest/
|
||||||
else
|
else
|
||||||
@@ -94,14 +115,12 @@ symlink_commit_pkg(){
|
|||||||
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
|
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
|
||||||
|
|
||||||
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
|
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
|
||||||
[[ -d repos/$dest ]] && git rm -r repos/$dest
|
prepare_commit "$dest"
|
||||||
[[ ! -d repos ]] && mkdir repos
|
|
||||||
[[ ! -d repos/$dest ]] && mkdir repos/$dest
|
|
||||||
|
|
||||||
cp repos/$src/* repos/$dest/
|
cp repos/$src/* repos/$dest/
|
||||||
git rm -r repos/$src
|
git rm -r repos/$src
|
||||||
fi
|
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"
|
msg "Action: %s" "$commit_msg"
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
|
@@ -153,9 +153,9 @@ configure_calamares(){
|
|||||||
msg2 "Configuring Calamares"
|
msg2 "Configuring Calamares"
|
||||||
write_users_conf > "$mods"/users.conf
|
write_users_conf > "$mods"/users.conf
|
||||||
write_servicescfg_conf > "$mods"/services-"${INITSYS}".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|openrc|${INITSYS}|" -i "$mods"/postcfg.conf
|
||||||
sed -e "s|services-openrc|services-${INITSYS}|" -i "$1"/etc/calamares/settings.conf
|
sed -e "s|services-openrc|services-${INITSYS}|" -i "$1"/etc/calamares/settings.conf
|
||||||
[[ -z ${DESKTOP_LIST} ]] && write_unpackfs_conf > "$mods"/unpackfs.conf
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user