Developing lightweight computation at the DSG edge

Commit 1c726297 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Update create_repository snippet



Now the snippet uses the "output" directory by default and copies both
packages and targets
Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent 615f3200
#!/bin/bash
. options.conf
. options.conf.local
OUTDIR="${1:-repository}"
OUTDIR="${1:-output}"
[ ! -d $OUTDIR ] && mkdir -p $OUTDIR
[ ! -d $OUTDIR/packages ] && mkdir -p $OUTDIR/packages
[ ! -d $OUTDIR/targers ] && mkdir -p $OUTDIR/targets
echo "-> Output directory: $OUTDIR"
for link in $OUTDIR/*; do
for link in $OUTDIR/packages/*; do
unlink $link 2>/dev/null
done
for link in $OUTDIR/targets/*; do
unlink $link 2>/dev/null
done
for target in $(cat $targets_list); do
for arch in $release/$target/sdk/bin/packages/*; do
[ -d "$arch" ] && {
echo "-> Creating symlink for $arch"
ln -s $PWD/$arch $OUTDIR/ 2>/dev/null
echo "-> Creating symlink for $arch packages"
ln -s $PWD/$arch $OUTDIR/packages/ 2>/dev/null
}
done
for arch in $release/$target/sdk/bin/targets/*; do
[ -d "$arch" ] && {
echo "-> Creating symlink for $arch targets"
ln -s $PWD/$arch $OUTDIR/targets/ 2>/dev/null
}
done
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment