From af63fb6417db18ab9fb358dc936be00477e00906 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Mon, 9 Feb 2015 13:36:09 +0100 Subject: [PATCH 1/5] fixed path issues in the kicad installer for Fedora --- fedora/install_kicad_fedora.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fedora/install_kicad_fedora.sh b/fedora/install_kicad_fedora.sh index 7c5e8679..de9083c7 100755 --- a/fedora/install_kicad_fedora.sh +++ b/fedora/install_kicad_fedora.sh @@ -1,5 +1,6 @@ #!/bin/bash sudo yum groupinstall "C Development Tools and Libraries" sudo yum install bzr bzrtools cmake GLC_lib-devel glew-devel cairo-devel bzip2-devel wxGTK-devel openssl-devel doxygen patch -./install_kicad.sh +../common/install_kicad_from_sources + From ddac80fd2ebbf13a79fefc0903f9696fe7c10b96 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Mon, 9 Feb 2015 13:47:00 +0100 Subject: [PATCH 2/5] more verbose errors for kicad installer on Fedora --- common/install_kicad_from_sources | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/install_kicad_from_sources b/common/install_kicad_from_sources index 5730cc98..17a494d4 100755 --- a/common/install_kicad_from_sources +++ b/common/install_kicad_from_sources @@ -1,5 +1,7 @@ #!/bin/bash +set -e + bzr launchpad-login "saipeloan" bzr whoami "Cyryl Plotnicki-Chudyk " @@ -16,17 +18,21 @@ bzr checkout lp:kicad kicad.bzr cd kicad.bzr mkdir build cd build +echo "compiling...." cmake -DKICAD_STABLE_VERSION=ON ../ make clean make -j8 +echo "installing..." sudo make install # install component libraries cd ~/build/kicad +echo "checking out libraries..." bzr checkout lp:~kicad-product-committers/kicad/library kicad-library.bzr cd kicad-library.bzr mkdir build cd build/ +echo "installing libraries" cmake ../ sudo make install From 6bcdb8b6b44a5c598e0ae8f24abd83eac1c4e173 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Fri, 13 Feb 2015 18:10:00 +0100 Subject: [PATCH 3/5] removed .sh extension from script for sd card backup --- tools/{backup_sdcard.sh => backup_sdcard} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tools/{backup_sdcard.sh => backup_sdcard} (100%) diff --git a/tools/backup_sdcard.sh b/tools/backup_sdcard similarity index 100% rename from tools/backup_sdcard.sh rename to tools/backup_sdcard From 93b2dc85a6f2d691d2fb3db223449e86168784d3 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Sat, 14 Feb 2015 08:25:34 +0100 Subject: [PATCH 4/5] added a script to restor sdcards from files --- tools/backup_sdcard | 5 +++-- tools/restore_sdcard | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 tools/restore_sdcard diff --git a/tools/backup_sdcard b/tools/backup_sdcard index a3b127c2..bc4f4aa0 100755 --- a/tools/backup_sdcard +++ b/tools/backup_sdcard @@ -14,8 +14,9 @@ echo "about to clone $device to $dest_file" echo "ctrl-c or [enter]" read -umount $device? -umount $device +sudo umount $device? +sudo umount $device sudo pv -tpreb $device | dd bs=4M | pixz > $dest_file +sudo sync diff --git a/tools/restore_sdcard b/tools/restore_sdcard new file mode 100755 index 00000000..adfc7138 --- /dev/null +++ b/tools/restore_sdcard @@ -0,0 +1,27 @@ +#!/bin/bash + +if [[ -z $1 ]] || [[ -z $2 ]]; then + echo "usage: $0 restore_file.xz device_to_restore_to" + exit +fi + +source_file=$1 +if [[ ! -f $source_file ]]; then + echo "cannot open $source_file" + exit +fi + +device=$2 +timestamp=`date +%Y%m%d` + +echo "about to restore $source_file onto $device" +echo "ctrl-c or [enter]" +read + +sudo umount $device? +sudo umount $device + +pv -tpreb $source_file | pixz -d | sudo dd bs=4M of=$device +sudo sync +sudo eject $device + From 07153e1f1fd189ce2c8da8a944e52e6c8ff65314 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Sat, 14 Feb 2015 08:33:03 +0100 Subject: [PATCH 5/5] minor cleanup to backup/restore scripts for devices --- tools/backup_sdcard | 1 + tools/restore_sdcard | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/backup_sdcard b/tools/backup_sdcard index bc4f4aa0..5802fc82 100755 --- a/tools/backup_sdcard +++ b/tools/backup_sdcard @@ -17,6 +17,7 @@ read sudo umount $device? sudo umount $device +sudo sync sudo pv -tpreb $device | dd bs=4M | pixz > $dest_file sudo sync diff --git a/tools/restore_sdcard b/tools/restore_sdcard index adfc7138..c8e0c688 100755 --- a/tools/restore_sdcard +++ b/tools/restore_sdcard @@ -12,7 +12,6 @@ if [[ ! -f $source_file ]]; then fi device=$2 -timestamp=`date +%Y%m%d` echo "about to restore $source_file onto $device" echo "ctrl-c or [enter]"