mkdist.sh 531 Bytes
Newer Older
John Spikowski's avatar
John Spikowski committed
1 2 3 4 5 6 7
#!/bin/bash

DEST="$1"

if [[ -n $DEST ]];then
    mkdir -p "$DEST"/{bin,include,module,lib}
    cp bin/exe/* "$DEST/bin"
8
    cp bin/exe/scriba "$DEST/bin/sb"
John Spikowski's avatar
John Spikowski committed
9 10 11
    cp bin/lib/* "$DEST/lib"
    cp bin/mod/dll/* "$DEST/module"
    find extensions -name "*.bas" -exec cp {} "$DEST/include" \;
Armando Rivera's avatar
Armando Rivera committed
12 13
    cp sb.sh "$DEST/sb.sh"
    chmod 755 "$DEST/sb.sh"
John Spikowski's avatar
John Spikowski committed
14 15 16 17
else
    printf "\n**WARNING** Missing path to destination folder\n"
    printf  "\nUsage:  $0 <FULL path to destination FOLDER>\n\n"
    printf  "Ex:  ./mkdist.sh ~/Projects/sb\n\n"
John Spikowski's avatar
John Spikowski committed
18 19
fi