summaryrefslogtreecommitdiff
path: root/link_sources.sh
blob: 6b8b8fbe60a863dce3faabfb119cde9af3ffec02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -e

link() {
  efl=$1
  package=$2
  mkdir --parents "./sources/$efl"

  if [ ! -e "./sources/$efl/$package" ]
  then
    read -e -p "[$efl] $package sources path: " -i "/" SRC
    if [[ ! "${SRC}" == "/" ]]
    then
      if [ -e "$SRC" ]
      then
        SRC=$(cd "$SRC"; pwd)
        ln -s "$SRC" "./sources/$efl/$package"
      else
        echo "Path doesn't exist: \"$SRC\""
        echo "skipping"
      fi
    else
      echo "skipping"
    fi
  fi
}

link efl_1.18 efl
link efl_1.18 eflete
link efl_tizen efl
link efl_tizen elementary
link efl_tizen eflete
link efl_upstream efl
link efl_upstream eflete