Commit 682b8420 authored by Joanne Hugé's avatar Joanne Hugé

Update scripts

Fix directory name
Add configure-all-boards script
parent 2d15c9bb
#!/bin/bash
./configure-board emerald;
./configure-board onyx;
./configure-board slate;
#!/bin/bash
usage() {
echo "Usage: $0 [-h] [-p PARTITION_NUMBER] (emerald | onyx | slate) DEVICE"
echo "Usage: $0 [-h] (emerald | onyx | slate)"
exit 1;
}
......@@ -12,9 +12,6 @@ while getopts "hp:" opt; do
h )
usage
;;
p )
partition_number=${OPTARG}
;;
* )
usage
;;
......@@ -23,28 +20,26 @@ done
shift $((OPTIND-1))
if [ -z "$2" ]; then
if [ -z "$1" ]; then
usage
fi
board_name=$1
device=$2
cfg_dir=../config
if [ $board_name != "emerald" ] && [ $board_name != "onyx" ] && [ $board_name != "slate" ]; then
usage
fi
rm -rf mnt_sd;
mkdir -p mnt_sd;
scp -r $cfg_dir/common $board_name:;
scp -r $cfg_dir/$board_name $board_name:;
echo "mount ${device}${partition_number} mnt_sd";
mount ${device}${partition_number} mnt_sd;
echo "cp -r $cfg_dir/common/* mnt_sd";
cp -r $cfg_dir/common/* mnt_sd;
echo "cp -r $cfg_dir/$board_name/* mnt_sd";
cp -r $cfg_dir/$board_name/* mnt_sd;
echo "umount ${device}${partition_number}";
umount ${device}${partition_number};
heredoc=$(cat << ENDSSH
sudo cp -r common/* /;
sudo cp -r $board_name/* /;
rm -rf common;
rm -rf $board_name;
ENDSSH
)
rm -rf mnt_sd;
ssh -t $board_name "$heredoc";
#!/bin/bash
usage() {
echo "Usage: $0 [-h] [-p PARTITION_NUMBER] (emerald | onyx | slate) DEVICE"
exit 1;
}
partition_number=2
while getopts "hp:" opt; do
case "${opt}" in
h )
usage
;;
p )
partition_number=${OPTARG}
;;
* )
usage
;;
esac
done
shift $((OPTIND-1))
if [ -z "$2" ]; then
usage
fi
board_name=$1
device=$2
cfg_dir=../config
if [ $board_name != "emerald" ] && [ $board_name != "onyx" ] && [ $board_name != "slate" ]; then
usage
fi
rm -rf mnt_sd;
mkdir -p mnt_sd;
echo "mount ${device}${partition_number} mnt_sd";
mount ${device}${partition_number} mnt_sd;
echo "cp -r $cfg_dir/common/* mnt_sd";
cp -r $cfg_dir/common/* mnt_sd;
echo "cp -r $cfg_dir/$board_name/* mnt_sd";
cp -r $cfg_dir/$board_name/* mnt_sd;
echo "umount ${device}${partition_number}";
umount ${device}${partition_number};
rm -rf mnt_sd;
......@@ -126,7 +126,7 @@ fi
# Compression
kernel_version=$(git branch | sed -n -e 's/^\* (HEAD detached at \(.*\))/\1/p')
kernel_version=$(git describe --tags)
output_name=${kernel_version}_kernel${output_str}
echo "Creating output folder";
......@@ -162,5 +162,5 @@ echo "Archive saved to $output_name.tar.gz"
if [ -n "$copy_to_sepia" ]; then
echo "Copying to sepia...";
scp $output_name.tar.gz sepia:/home/vlaya/Documents/tsn-internship/img-kernel-utils/scripts/kernels/;
scp $output_name.tar.gz sepia:Documents/tsn-internship/img-kernel-utils/custom-kernels;
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment