From adaeca9e84b97bd4ea94c6941d18ae02bc18089e Mon Sep 17 00:00:00 2001 From: cyteen Date: Sat, 10 Oct 2020 18:47:10 +0100 Subject: [PATCH] New additions. --- 020_bmaptools.sh | 23 ++++++++++++++++++ 020_kicad.sh | 1 + .../.config.yaml.swp | Bin 0 -> 12288 bytes sed_comment-uncomment_example/config.yaml | 11 +++++++++ sed_comment-uncomment_example/test-sed.sh | 23 ++++++++++++++++++ 5 files changed, 58 insertions(+) create mode 100644 020_bmaptools.sh create mode 100644 020_kicad.sh create mode 100644 sed_comment-uncomment_example/.config.yaml.swp create mode 100644 sed_comment-uncomment_example/config.yaml create mode 100644 sed_comment-uncomment_example/test-sed.sh diff --git a/020_bmaptools.sh b/020_bmaptools.sh new file mode 100644 index 0000000..dbe0373 --- /dev/null +++ b/020_bmaptools.sh @@ -0,0 +1,23 @@ +apt-get install bmap-tools + +# FIXME +# create function for ''bmap-tool create' that fixes the zfs_dmu_offset_next_sync issue + +#function bmapcreate() { +# echo 1 | sudo tee -a /sys/module/zfs/parameters/zfs_dmu_offset_next_sync +# +# BMAPFILE=$1 +# IMAGE=$2 +## test the extension to see if we need to decompress before creating the bmap +# if [ ${IMAGE:e} = 'xz'] +# bmaptool create --output mobian-pinephone-20200905.img.bmap mobian-pinephone-20200905.img +# bmaptool create --output $BMAPFILE $IMAGE +# +# echo 0 | sudo tee -a /sys/module/zfs/parameters/zfs_dmu_offset_next_sync +#} + + +#function bmapcopy() { +# bmaptool copy --bmap $BMAPFILE $IMAGE $BLOCKDEVICE +#} + diff --git a/020_kicad.sh b/020_kicad.sh new file mode 100644 index 0000000..03d752f --- /dev/null +++ b/020_kicad.sh @@ -0,0 +1 @@ +apt-get -y install kicad kicad-libraries kicad-symbols kicad-footprints kicad-templates kicad-demos kicad-packages3d diff --git a/sed_comment-uncomment_example/.config.yaml.swp b/sed_comment-uncomment_example/.config.yaml.swp new file mode 100644 index 0000000000000000000000000000000000000000..fa32e62a57ed3a4cf13db6ae8c106c666eb2406b GIT binary patch literal 12288 zcmeI2&ui2`6vtn+h$5}EJ*l9tyPycp{;G$vs8DK^9xMg7dXh5P%yv_gnUK8gc2C~? z1Nio1MD#e@I0XH z*JlB~UI7SINA_ZJR}MWwwbzsS&>_Q%RZ7w-shp~9qdU<~WgwII@3-*?HoyjsYoJFR zu{;Ayje5;ZRW2>!!u-~8XXX3Z02^QfY=8~00XDz}*Z>mQ{$e`kL%Qd zIzHvX2G{@_U;}J`4X^<=zy{a=8(;%$fDN2L12P1t%>wM(xc&dh|NkEs0N&fYwRvOn z%;vit^Umg#%}bksjl1uI4cXLfKFt8!w3QDwzy{a=8(;%$fDNz#Hoyk{4+CNa*Ecq| zS|}3CNs>Y#Ms;KDse{x`QKX|H!qjAhjasdNVi#9dSJyUM;I;={ZcLA=d$9>y^ss9l zcG<%gJZ#RxWRWrDYJSa62_|)Q(i% zgp1>~c(*WW!j=jQd%A6sL}|j(_~9j#I;@%uOOw`07-^)g!Z^wa0~MQoWw=@HR{Nd8 zY;FVHu||QFv1M@7AZ98xc|<0&J=zH+Vb|ChbJL-|%oO$`>JEk6fAIL>(29LzTj^Zo zw_s0Yd1Q1GgI*lxYM>yr?KCk|L1e$Y?`3flyF_WTT2=ex9wkW0q>{=Vl~+ciDq7L+ LtDz(bLJ0T;BDU8i literal 0 HcmV?d00001 diff --git a/sed_comment-uncomment_example/config.yaml b/sed_comment-uncomment_example/config.yaml new file mode 100644 index 0000000..ba391fd --- /dev/null +++ b/sed_comment-uncomment_example/config.yaml @@ -0,0 +1,11 @@ +--- +url: http://extrepo-team.pages.debian.net/extrepo-data +dist: debian +version: bullseye +# To enable repositories that host software with non-DFSG-free licenses, +# # uncomment "contrib" and/or "non-free" in the list below. +enabled_policies: +- main +# - contrib +# - non-free + diff --git a/sed_comment-uncomment_example/test-sed.sh b/sed_comment-uncomment_example/test-sed.sh new file mode 100644 index 0000000..38d97ef --- /dev/null +++ b/sed_comment-uncomment_example/test-sed.sh @@ -0,0 +1,23 @@ +CONFIG_FILE=./config.yaml +PATTERN1="contrib" +PATTERN2="non-free" + +cat ${CONFIG_FILE} + +echo "Uncomment:" +echo "PATTERN1: sed -i \"/${PATTERN1}/s/^#.//g\" ${CONFIG_FILE}" +sed -i "/${PATTERN1}/s/^#.//g" ${CONFIG_FILE} # (to uncomment) + +echo "PATTERN2: sed -i \"/${PATTERN2}/s/^#.//g\" ${CONFIG_FILE}" +sed -i "/${PATTERN2}/s/^#.//g" ${CONFIG_FILE} # (to uncomment) + +cat ${CONFIG_FILE} + +echo "Comment:" +echo "sed -i \"/${PATTERN1}/s/^/# /g" ${CONFIG_FILE}\" # (to comment) +sed -i "/${PATTERN1}/s/^/# /g" ${CONFIG_FILE} # (to comment) + +echo "sed -i \"/${PATTERN2}/s/^/# /g" ${CONFIG_FILE}\" # (to comment) +sed -i "/${PATTERN2}/s/^/# /g" ${CONFIG_FILE} # (to comment) + +cat ${CONFIG_FILE}