Developing lightweight computation at the DSG edge

create_repository.sh 821 Bytes
Newer Older
1
2
#!/bin/bash
. options.conf
3
. options.conf.local
4
5

OUTDIR="${1:-output}"
6
[ ! -d $OUTDIR ] && mkdir -p $OUTDIR
7
8
9
[ ! -d $OUTDIR/packages ] && mkdir -p $OUTDIR/packages
[ ! -d $OUTDIR/targers ] && mkdir -p $OUTDIR/targets

10
echo "-> Output directory: $OUTDIR"
11
12

for link in $OUTDIR/packages/*; do
13
14
  unlink $link 2>/dev/null
done
15
16
17
18
for link in $OUTDIR/targets/*; do
  unlink $link 2>/dev/null
done

19
20
21
for target in $(cat $targets_list); do
  for arch in $release/$target/sdk/bin/packages/*; do
    [ -d "$arch" ] && {
22
23
24
25
26
27
28
29
      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
30
31
32
    }
  done
done