Skip to content

Commit e42b7cb

Browse files
author
Cupertino Miranda
committed
Added script to soft-link source directories.
1 parent 658680d commit e42b7cb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
if [ "$#" -ne 1 ]; then
4+
echo "Should provide the directories with the proper sources."
5+
fi
6+
7+
DIRECTORIES="binutils-gdb newlib gcc glibc linux qemu"
8+
9+
for i in ${DIRECTORIES}; do
10+
if [[ -d ./$i ]]
11+
then
12+
echo "Skipping $i since directory exists in $(pwd)"
13+
fi
14+
15+
if [[ -d $1/$i ]]
16+
then
17+
ln -v -s $1/$i ./$i
18+
else
19+
echo "Destination directory $1/$i does not exist!"
20+
fi
21+
done
22+

0 commit comments

Comments
 (0)