add .pkgdata; add non-download packages
This commit is contained in:
@ -10,7 +10,7 @@ sed -i 's/int (\*proc_func)()/int (*proc_func)(FILE *, FILE *, void *)/' filter/
|
|||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure --prefix=$pkgpath
|
./configure --prefix=$pkgpath
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install CUPS_DATADIR=$pkgpath/share/cups
|
||||||
```
|
```
|
||||||
|
|
||||||
``` cfg *** build deps ***
|
``` cfg *** build deps ***
|
||||||
|
|||||||
@ -7,3 +7,26 @@ https://github.com/OpenPrinting/cups/archive/refs/tags/v2.4.19.tar.gz
|
|||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
``` sh *** config ***
|
||||||
|
ln -sf /pkg/gnu/bin/foomatic-ppdfile lib/cups/driver/foomatic
|
||||||
|
sed -i 's|^#ServerBin /pkg/gnu/cups/lib/cups|ServerBin /pkg/gnu/lib/cups|' etc/cups/cups-files.conf
|
||||||
|
sed -i 's|^#DataDir /pkg/gnu/cups/share/cups|DataDir /pkg/gnu/share/cups|' etc/cups/cups-files.conf
|
||||||
|
sed -i 's|^#TempDir /pkg/gnu/cups/var/spool/cups/tmp|TempDir /pkg/gnu/cups/var/spool/cups/tmp|' etc/cups/cups-files.conf
|
||||||
|
chmod 1777 /pkg/gnu/cups/var/spool/cups/tmp
|
||||||
|
grep -q "SetEnv TMPDIR" /pkg/gnu/cups/etc/cups/cupsd.conf || \
|
||||||
|
echo 'SetEnv TMPDIR /pkg/gnu/cups/var/spool/cups/tmp' >> /pkg/gnu/cups/etc/cups/cupsd.conf
|
||||||
|
|
||||||
|
#sed -i 's|^#User nobody|User nobody|' /pkg/gnu/cups/etc/cups/cups-files.conf
|
||||||
|
#sed -i 's|^#Group lp|Group lp|' /pkg/gnu/cups/etc/cups/cups-files.conf
|
||||||
|
#echo 'SetEnv GS_OPTIONS -dNOSAFER' >> /pkg/gnu/cups/etc/cups/cupsd.conf
|
||||||
|
|
||||||
|
usermod -aG lp nobody 2>/dev/null || gpasswd -a nobody lp
|
||||||
|
chmod 750 /pkg/gnu/cups/var/spool/cups
|
||||||
|
chown root:lp /pkg/gnu/cups/var/spool/cups
|
||||||
|
```
|
||||||
|
|
||||||
|
``` cfg *** build deps ***
|
||||||
|
libusb
|
||||||
|
foomatic-db-engine
|
||||||
|
```
|
||||||
|
|||||||
@ -8,3 +8,7 @@ https://github.com/OpenPrinting/foomatic-db.git
|
|||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
``` cfg *** run deps ***
|
||||||
|
foomatic-db-engine
|
||||||
|
```
|
||||||
|
|||||||
@ -12,10 +12,9 @@ make install
|
|||||||
``` sh *** config ***
|
``` sh *** config ***
|
||||||
mkdir -p /pkg/gnu/git/etc
|
mkdir -p /pkg/gnu/git/etc
|
||||||
git config --system http.sslCAInfo /pkg/gnu/openssl/ssl/cacert.pem
|
git config --system http.sslCAInfo /pkg/gnu/openssl/ssl/cacert.pem
|
||||||
git config --global url."https://github.com/".insteadOf "git@github.com:"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
``` cfg *** build deps ***
|
``` cfg *** build deps ***
|
||||||
curl
|
curl
|
||||||
pcre2
|
pcre2
|
||||||
zlib
|
zlib
|
||||||
@ -24,4 +23,14 @@ libxcrypt
|
|||||||
|
|
||||||
``` cfg *** run deps ***
|
``` cfg *** run deps ***
|
||||||
perl
|
perl
|
||||||
|
less
|
||||||
|
```
|
||||||
|
|
||||||
|
``` sh *** set ***
|
||||||
|
git config --global url."https://github.com/".insteadOf "git@github.com:"
|
||||||
|
git config --global alias.whoim '!echo "Name: $(git config user.name)" && echo "Email: $(git config user.email)"'
|
||||||
|
git config --global alias.im '!echo "Name: $(git config user.name)" && echo "Email: $(git config user.email)"'
|
||||||
|
git config --global alias.trace '!git config user.name "TraceLumen" && git config user.email "tracelumen@root-kit.ru" && echo "Author set to Trace"'
|
||||||
|
git config --global alias.sam '!git config user.name "sam" && git config user.email "svvivel@gmail.com" && echo "Author set to sam"'
|
||||||
|
git config --global core.editor nvim
|
||||||
```
|
```
|
||||||
|
|||||||
@ -10,6 +10,6 @@ ninja
|
|||||||
ninja install
|
ninja install
|
||||||
```
|
```
|
||||||
|
|
||||||
``` cfg *** build deps ***
|
``` cfg *** build run deps ***
|
||||||
mesa
|
mesa
|
||||||
```
|
```
|
||||||
|
|||||||
9
assets/var/gnu/groff.md
Normal file
9
assets/var/gnu/groff.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
groff 1.24.1
|
||||||
|
=
|
||||||
|
https://ftp.gnu.org/gnu/groff/groff-1.24.1.tar.gz
|
||||||
|
|
||||||
|
``` sh *** build ***
|
||||||
|
./configure --prefix=$pkgpath
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
```
|
||||||
@ -70,8 +70,15 @@ PyMODINIT_FUNC PyInit_pcardext(void)\
|
|||||||
sed -i 's/static column = 0 ;/static int column = 0 ;/' prnt/hpps/pserror.c
|
sed -i 's/static column = 0 ;/static int column = 0 ;/' prnt/hpps/pserror.c
|
||||||
```
|
```
|
||||||
|
|
||||||
|
./configure --prefix=/pkg/gnu/hplip --disable-network-build --disable-pcard-build
|
||||||
|
|
||||||
``` sh *** build ***
|
``` sh *** build ***
|
||||||
./configure --prefix=$pkgpath --disable-network-build --disable-pcard-build
|
./configure \
|
||||||
|
--prefix=$pkgpath \
|
||||||
|
--disable-network-build \
|
||||||
|
--disable-pcard-build \
|
||||||
|
--with-cupsfilterdir=$pkgpath/lib/cups/filter \
|
||||||
|
--with-cupsbackenddir=$pkgpath/lib/cups/backend
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|||||||
15
assets/var/gnu/less.md
Normal file
15
assets/var/gnu/less.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
less
|
||||||
|
=
|
||||||
|
https://github.com/gwsw/less.git
|
||||||
|
|
||||||
|
``` sh *** build ***
|
||||||
|
make -f Makefile.aut distfiles
|
||||||
|
autoreconf -i
|
||||||
|
./configure --prefix=$pkgpath
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
``` sh *** run deps ***
|
||||||
|
groff
|
||||||
|
```
|
||||||
@ -9,5 +9,9 @@ make prefix=/pkg/gnu/mupdf install
|
|||||||
|
|
||||||
``` cfg *** build deps ***
|
``` cfg *** build deps ***
|
||||||
glu
|
glu
|
||||||
|
```
|
||||||
|
|
||||||
|
``` cfg *** build run deps ***
|
||||||
|
glu
|
||||||
llvm
|
llvm
|
||||||
```
|
```
|
||||||
|
|||||||
@ -10,7 +10,7 @@ make install
|
|||||||
|
|
||||||
``` sh *** config ***
|
``` sh *** config ***
|
||||||
pip3 install setuptools
|
pip3 install setuptools
|
||||||
ln bin/python3 bin/python
|
ln -f bin/python3 bin/python
|
||||||
```
|
```
|
||||||
|
|
||||||
``` cfg *** build deps ***
|
``` cfg *** build deps ***
|
||||||
|
|||||||
@ -1,20 +1,41 @@
|
|||||||
|
unitprint/backend-local
|
||||||
|
=
|
||||||
|
ssh://git@root-kit.ru:17458/UnitPrint/backend-local.git
|
||||||
|
|
||||||
|
``` env *** env ***
|
||||||
|
disable
|
||||||
|
```
|
||||||
|
|
||||||
|
``` sh *** build ***
|
||||||
|
cargo build --release
|
||||||
|
mkdir ../bin
|
||||||
|
cp -l target/release/backend-local ../bin
|
||||||
|
```
|
||||||
|
|
||||||
cargo new backend-local
|
|
||||||
|
|
||||||
|
|
||||||
``` cfg *** run deps ***
|
``` cfg *** run deps ***
|
||||||
cups
|
cups
|
||||||
cups-filters
|
cups-filters
|
||||||
foomatic-db
|
foomatic-db
|
||||||
foomatic-db-engine
|
|
||||||
hplip
|
hplip
|
||||||
```
|
```
|
||||||
|
|
||||||
Для раздачи инета службу поднять/конфиг сделать под unitprint ей
|
``` sh *** setup ***
|
||||||
|
PRINTER_URI=$(lpinfo -v | awk '/^direct usb:\/\// {print $2; exit}')
|
||||||
|
MODEL=$(python3 -c "import urllib.parse,sys; print(urllib.parse.unquote('$PRINTER_URI'.split('/')[-1].split('?')[0]))")
|
||||||
|
PPD_PATH=$(lpinfo -m | grep -i "$MODEL" | grep -iv 'postscript' | grep -i 'hpcups' | head -n1 | awk '{print $1}')
|
||||||
|
if [[ -z "$PPD_PATH" ]]; then
|
||||||
|
PPD_PATH=$(lpinfo -m | grep -i "$MODEL" | grep -iv 'postscript' | head -n1 | awk '{print $1}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "URI: $PRINTER_URI"
|
||||||
|
echo "Model: $MODEL"
|
||||||
|
echo "PPD: $PPD_PATH"
|
||||||
|
|
||||||
|
lpadmin -p Auto_HP_P2015 -E -v "$PRINTER_URI" -m "$PPD_PATH"
|
||||||
|
lpadmin -d Auto_HP_P2015
|
||||||
|
|
||||||
|
echo "Default printer set:"
|
||||||
|
lpstat -d
|
||||||
|
|
||||||
|
lpoptions -p Auto_HP_P2015 -o PageSize=A4
|
||||||
|
```
|
||||||
|
|||||||
11
assets/var/gnu/unitprint/backend-local/s6.md
Normal file
11
assets/var/gnu/unitprint/backend-local/s6.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
unitprint/backend-local/s6
|
||||||
|
=
|
||||||
|
|
||||||
|
|
||||||
|
``` sh *** set ***
|
||||||
|
ln -sf $(pwd) /pkg/gnu/s6/etc/service/current/unitprint-backend-local
|
||||||
|
```
|
||||||
|
|
||||||
|
``` sh *** off ***
|
||||||
|
rm /pkg/gnu/s6/etc/service/current/unitprint-backend-local
|
||||||
|
```
|
||||||
1
assets/var/gnu/unitprint/backend-local/s6/.pkgdata/run
Symbolic link
1
assets/var/gnu/unitprint/backend-local/s6/.pkgdata/run
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bin/backend-local
|
||||||
@ -1,9 +1,11 @@
|
|||||||
unitprint/backend/scan/DocRes
|
unitprint/backend/scan/DocRes
|
||||||
=
|
=
|
||||||
https://github.com/ZZZHANG-jx/DocRes.git
|
ssh://git@root-kit.ru:17458/UnitPrint/scan-DocRes.git
|
||||||
|
git remote set-url origin ssh://git@root-kit.ru:17458/UnitPrint/scan-DocScanner.git
|
||||||
|
|
||||||
``` sh *** build ***
|
``` sh *** build ***
|
||||||
mv * ..
|
cp -rfPl * ..
|
||||||
|
cp -rfPl .* ..
|
||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** config ***
|
``` sh *** config ***
|
||||||
@ -17,44 +19,3 @@ mkdir -p data/weights
|
|||||||
#rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
#rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
||||||
#rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
#rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
||||||
```
|
```
|
||||||
|
|
||||||
mkdir -p ~/.config/miopen
|
|
||||||
export MIOPEN_USER_DB_PATH="/root/.config/miopen"
|
|
||||||
export MIOPEN_FIND_MODE=3
|
|
||||||
export HIP_VISIBLE_DEVICES=0
|
|
||||||
|
|
||||||
time ../../venv/bin/python inference.py \
|
|
||||||
--task deshadowing \
|
|
||||||
--im_path ./IMG_20260905_172410_rec.jpg \
|
|
||||||
--out_folder ./
|
|
||||||
|
|
||||||
time python inference.py \
|
|
||||||
--task appearance \
|
|
||||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing.png \
|
|
||||||
--out_folder ./output_pipeline
|
|
||||||
|
|
||||||
time python inference.py \
|
|
||||||
--task deblurring \
|
|
||||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing_appearance.png \
|
|
||||||
--out_folder ./output_pipeline
|
|
||||||
|
|
||||||
time python inference.py \
|
|
||||||
--task deblurring \
|
|
||||||
--im_path ../../DocScanner/src/rectified/IMG_20260905_172410_rec.png \
|
|
||||||
--out_folder ./output_pipeline
|
|
||||||
|
|
||||||
time python inference.py \
|
|
||||||
--task appearance \
|
|
||||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deblurring.png \
|
|
||||||
--out_folder ./output_pipeline
|
|
||||||
|
|
||||||
# 3. Appearance
|
|
||||||
time python inference.py \
|
|
||||||
--task appearance \
|
|
||||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing.png \
|
|
||||||
--out_folder ./output_pipeline
|
|
||||||
|
|
||||||
time python inference.py \
|
|
||||||
--task dewarping \
|
|
||||||
--im_path /pkg/gnu/unitprint/DocScanner/src/distorted/IMG_20260905_172410.jpg \
|
|
||||||
--out_folder ./output_pipeline
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
unitprint/backend/scan/DocScanner
|
unitprint/backend/scan/DocScanner
|
||||||
=
|
=
|
||||||
https://root-kit.ru/UnitPrint/scan-DocScanner.git
|
ssh://git@root-kit.ru:17458/UnitPrint/scan-DocScanner.git
|
||||||
|
|
||||||
``` sh *** build ***
|
``` sh *** build ***
|
||||||
mv * ..
|
cp -rfPl * ..
|
||||||
|
cp -rfPl .* ..
|
||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** config ***
|
``` sh *** config ***
|
||||||
|
|||||||
@ -7,7 +7,16 @@ save_source=true
|
|||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** build ***
|
``` sh *** build ***
|
||||||
ls
|
git pull
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
rm -rf ../dist
|
||||||
|
cp -rPl dist ..
|
||||||
|
```
|
||||||
|
|
||||||
|
``` sh *** config ***
|
||||||
|
chmod o+x /pkg/gnu/unitprint
|
||||||
|
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
|
||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** init ***
|
``` sh *** init ***
|
||||||
@ -16,5 +25,3 @@ npm create vite@latest . -- --template svelte --no-interactive --overwrite
|
|||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
chmod o+x /pkg/gnu/unitprint
|
|
||||||
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
|
|
||||||
|
|||||||
10
assets/var/gnu/usbutils.md
Normal file
10
assets/var/gnu/usbutils.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
usbutils
|
||||||
|
=
|
||||||
|
|
||||||
|
``` sh *** build ***
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
meson setup --prefix=$pkgpath --libdir=lib --buildtype=release ..
|
||||||
|
ninja
|
||||||
|
ninja install
|
||||||
|
```
|
||||||
6
dev.sh
6
dev.sh
@ -20,11 +20,11 @@ mkdir -p "$SCRIPT_DIR/target/release/bin"
|
|||||||
cp -f "$SCRIPT_DIR/target/release/pkg" "$SCRIPT_DIR/target/release/bin"
|
cp -f "$SCRIPT_DIR/target/release/pkg" "$SCRIPT_DIR/target/release/bin"
|
||||||
|
|
||||||
echo "Installing to '$INSTALL_PATH'..."
|
echo "Installing to '$INSTALL_PATH'..."
|
||||||
rsync -a --delete --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" "$INSTALL_PATH/"
|
rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" "$INSTALL_PATH/"
|
||||||
PATH="/bin:/pkg/musl/bin:/pkg/musl/sbin:/pkg/gnu/bin:/pkg/gnu/sbin" chroot /mnt/aerolinux /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
PATH="/bin:/pkg/musl/bin:/pkg/musl/sbin:/pkg/gnu/bin:/pkg/gnu/sbin" chroot /mnt/aerolinux /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
||||||
rsync -a --delete --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" air:"$INSTALL_PATH/"
|
rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" air:"$INSTALL_PATH/"
|
||||||
ssh air /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
ssh air /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
||||||
rsync -a --delete --exclude='etc/index-conflict.md' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" aura:"$INSTALL_PATH/"
|
rsync -a --exclude='etc/index-conflict.md' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" aura:"$INSTALL_PATH/"
|
||||||
ssh aura /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
ssh aura /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
||||||
|
|
||||||
BIN_PATH="$INSTALL_PATH/bin/pkg"
|
BIN_PATH="$INSTALL_PATH/bin/pkg"
|
||||||
|
|||||||
@ -20,7 +20,7 @@ mkdir -p "$SCRIPT_DIR/target/release/bin"
|
|||||||
cp -f "$SCRIPT_DIR/target/release/pkg" "$SCRIPT_DIR/target/release/bin"
|
cp -f "$SCRIPT_DIR/target/release/pkg" "$SCRIPT_DIR/target/release/bin"
|
||||||
|
|
||||||
echo "Installing to '$INSTALL_PATH'..."
|
echo "Installing to '$INSTALL_PATH'..."
|
||||||
rsync -a --delete --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" "$INSTALL_PATH/"
|
rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" "$INSTALL_PATH/"
|
||||||
"$INSTALL_PATH/bin/pkg" link aeropkg
|
"$INSTALL_PATH/bin/pkg" link aeropkg
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,9 +19,18 @@ pub fn install(repo: &String, pkgname: &String) {
|
|||||||
|
|
||||||
check_build_dependency(repo, pkg_md_path);
|
check_build_dependency(repo, pkg_md_path);
|
||||||
check_run_dependency(pkg_md_path);
|
check_run_dependency(pkg_md_path);
|
||||||
download(repo, pkgname);
|
match parser::pkginfo::get_url(pkg_md_path) {
|
||||||
patch(repo, pkgname);
|
Ok(url) => {
|
||||||
build(repo, pkgname);
|
if url.trim() != "" {
|
||||||
|
download(repo, pkgname);
|
||||||
|
patch(repo, pkgname);
|
||||||
|
build(repo, pkgname)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
panic!("Failed to parse URL: {}", e)
|
||||||
|
}
|
||||||
|
};
|
||||||
config(repo, pkgname);
|
config(repo, pkgname);
|
||||||
let full_env = &get_custom_env(repo, pkgname, pkg_md_path);
|
let full_env = &get_custom_env(repo, pkgname, pkg_md_path);
|
||||||
shell::run_install_repo_hook_script(repo, full_env);
|
shell::run_install_repo_hook_script(repo, full_env);
|
||||||
|
|||||||
@ -1,24 +1,29 @@
|
|||||||
use crate::commands::link::link;
|
use crate::commands::link::link;
|
||||||
use crate::utils::parser::{self, env::get_install_env};
|
use crate::utils::parser::{self, env::get_install_env};
|
||||||
use crate::utils::shell;
|
use crate::utils::shell;
|
||||||
|
use std::process::Command;
|
||||||
|
|
||||||
pub fn config(repo: &String, pkgname: &String) {
|
pub fn config(repo: &String, pkgname: &String) {
|
||||||
let pkg_dir = &crate::commands::get_aeropkg_base().join(repo).join(pkgname);
|
let pkg_dir = crate::commands::get_aeropkg_base().join(repo).join(pkgname);
|
||||||
let pkg_md_path = &crate::commands::get_aeropkg_var().join(format!("{}/{}.md", repo, pkgname));
|
let pkg_md_path = crate::commands::get_aeropkg_var().join(format!("{}/{}.md", repo, pkgname));
|
||||||
|
let pkgdata = crate::commands::get_aeropkg_var().join(repo).join(pkgname).join(".pkgdata");
|
||||||
|
|
||||||
let config_script = match parser::get_config_script(pkg_md_path) {
|
if pkgdata.exists() {
|
||||||
|
let status = Command::new("cp").args(["-rPl", &format!("{}/.", pkgdata.to_string_lossy()), &pkg_dir.to_string_lossy()]).status();
|
||||||
|
if let Err(e) = status { eprintln!("Warning: failed to copy .pkgdata for {}/{}: {}", repo, pkgname, e) }
|
||||||
|
}
|
||||||
|
|
||||||
|
let config_script = match parser::get_config_script(&pkg_md_path) {
|
||||||
Ok(script) => script,
|
Ok(script) => script,
|
||||||
Err(_) => { return }
|
Err(_) => return,
|
||||||
};
|
};
|
||||||
|
|
||||||
let full_env = get_install_env(repo, pkgname, pkg_md_path, "config");
|
let full_env = get_install_env(repo, pkgname, &pkg_md_path, "config");
|
||||||
shell::run_install_script(&config_script, pkg_dir, &full_env);
|
shell::run_install_script(&config_script, &pkg_dir, &full_env);
|
||||||
shell::run_install_repo_stage_hook_script(repo, "config", &full_env);
|
shell::run_install_repo_stage_hook_script(repo, "config", &full_env);
|
||||||
shell::run_install_stage_hook_script("download", &full_env);
|
shell::run_install_stage_hook_script("download", &full_env);
|
||||||
|
|
||||||
|
if !pkg_dir.join("disabled").exists() {
|
||||||
if !crate::commands::get_aeropkg_base().join(repo).join(pkgname).join("disabled").exists() {
|
link(repo, pkgname);
|
||||||
link(repo, pkgname)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,8 +9,6 @@ pub fn download(repo: &String, pkgname: &String) {
|
|||||||
let pkg_md_path = &crate::commands::get_aeropkg_var().join(format!("{}/{}.md", repo, pkgname));
|
let pkg_md_path = &crate::commands::get_aeropkg_var().join(format!("{}/{}.md", repo, pkgname));
|
||||||
if !pkg_md_path.exists() { upload_from_repo(repo, pkgname, pkg_md_path) }
|
if !pkg_md_path.exists() { upload_from_repo(repo, pkgname, pkg_md_path) }
|
||||||
|
|
||||||
let full_env = get_install_env(repo, pkgname, pkg_md_path, "download");
|
|
||||||
|
|
||||||
let url = match parser::pkginfo::get_url(pkg_md_path) {
|
let url = match parser::pkginfo::get_url(pkg_md_path) {
|
||||||
Ok(url) => url,
|
Ok(url) => url,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
@ -29,6 +27,14 @@ pub fn download(repo: &String, pkgname: &String) {
|
|||||||
fs::remove_dir_all(&src).unwrap()
|
fs::remove_dir_all(&src).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let pkgdata = crate::commands::get_aeropkg_var().join(repo).join(pkgname).join(".pkgdata.patch");
|
||||||
|
if pkgdata.exists() {
|
||||||
|
let status = Command::new("cp").args(["-rPl", &format!("{}/.", pkgdata.to_string_lossy()), &src.to_string_lossy()]).status();
|
||||||
|
if let Err(e) = status { eprintln!("Warning: failed to copy .pkgdata for {}/{}: {}", repo, pkgname, e) }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let full_env = get_install_env(repo, pkgname, pkg_md_path, "download");
|
||||||
|
|
||||||
if url.ends_with(".git") || url.starts_with("git://") {
|
if url.ends_with(".git") || url.starts_with("git://") {
|
||||||
let git_status = Command::new("git")
|
let git_status = Command::new("git")
|
||||||
|
|||||||
Reference in New Issue
Block a user