sugarlabs / rpi23-gen-image

Advanced Debian "jessie" and "stretch" bootstrap script for RPi2/3
GNU General Public License v2.0
0 stars 1 forks source link

Activity download not scalable #7

Open quozl opened 7 years ago

quozl commented 7 years ago

Rather than a series of wget and unzip commands, this might be simplified to a list of URLs and code that parses the list;

for URL in $(<files/Sugar-activities-list); do
    BASE=$(basename $URL)
    FILE=files/Sugar-activities/$BASE
    if [ ! -e $FILE ]; then
        wget $URL -P files/Sugar-activities
    fi
    unzip $FILE -d ${BUILDDIR}/chroot/usr/share/sugar/activities
done
Rishabh42 commented 7 years ago

Thanks for simplifying it, was working on something similar. Will try this code

Rishabh42 commented 7 years ago

I tried this code by replacing the multiple wget and unzip files in 11-mod.sh but it didn't work. The activities were not installed, I had also created a new file named 'Sugar-activities-list' with the list of URLs.

quozl commented 7 years ago

You'd better debug it then. Good chance that it is the bash-ism on the first line. See "man bash" for more detail, and compare to whatever shell you or your distribution has configured to be /bin/sh, which is activated by the first line of rpi23-gen-image.sh

Rishabh42 commented 7 years ago

Alright, will do that

quozl commented 6 years ago

Since this discussion above, Sugar Live Build uses a shell script to git clone activity repositories into the build tree, see build. This method avoids both embedded bundles and submodules.