From bdfd79b542250f83c6a2b9738797745f7f557800 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Wed, 14 Dec 2022 13:58:09 +0300 Subject: [PATCH] Updated scripts --- scripts/clean_kcpsm.sh | 16 +++++++++++++++ scripts/git_pull_subdirs.sh | 39 +++++++++++++++++++++++++++++++++++++ scripts/make_kcpsm.sh | 13 +++++++++++++ scripts/update_git_repos.sh | 21 -------------------- 4 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 scripts/clean_kcpsm.sh create mode 100644 scripts/git_pull_subdirs.sh create mode 100644 scripts/make_kcpsm.sh delete mode 100755 scripts/update_git_repos.sh diff --git a/scripts/clean_kcpsm.sh b/scripts/clean_kcpsm.sh new file mode 100644 index 0000000..dda7a9d --- /dev/null +++ b/scripts/clean_kcpsm.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +# ------------------------------------------------------------------------------ +# clean_kcpsm.sh +# published as part of https://github.com/pConst/basic_verilog +# Konstantin Pavlov, pavlovconst@gmail.com +# ------------------------------------------------------------------------------ +# +# Use this file as a boilerplate for your custom clean script +# for KCPSM directories + + +rm -f *.txt +rm -f *.fmt +rm -f *.log + diff --git a/scripts/git_pull_subdirs.sh b/scripts/git_pull_subdirs.sh new file mode 100644 index 0000000..b712bd1 --- /dev/null +++ b/scripts/git_pull_subdirs.sh @@ -0,0 +1,39 @@ +#! /usr/bin/env bash + +# git_pull_subdirs.sh +# published as part of https://github.com/pConst/basic_verilog +# Konstantin Pavlov, pavlovconst@gmail.com +# +# Simple script to update all git repos in the current directory +# +# =========================================================================== +# !! CAUTION! All repos will be reset and all uncommitted changes lost !! +# =========================================================================== + + +eval $(ssh-agent) +ssh-add + +pp=$(pwd) + +#find . -maxdepth 1 -type d -print0 | while IFS= read -r -d '' fp; do +find . -type d -print0 | while IFS= read -r -d '' fp; do + cd "$fp" + if [ -d "./.git" ]; then + + echo + echo "===================================================================" + echo "Working in $fp" + echo "===================================================================" + + git config --replace-all core.filemode false + + #git reset --hard + + git pull --recurse-submodules --all + #git submodule init + git submodule update --recursive + fi + cd "$pp" +done + diff --git a/scripts/make_kcpsm.sh b/scripts/make_kcpsm.sh new file mode 100644 index 0000000..7895f5e --- /dev/null +++ b/scripts/make_kcpsm.sh @@ -0,0 +1,13 @@ +#! /usr/bin/env bash + +# ------------------------------------------------------------------------------ +# make_kcpsm.sh +# published as part of https://github.com/pConst/basic_verilog +# Konstantin Pavlov, pavlovconst@gmail.com +# ------------------------------------------------------------------------------ +# +# Use this file to assemble KCPSM memory files from .psm sources + + +wine kcpsm6.exe main_psm.psm + diff --git a/scripts/update_git_repos.sh b/scripts/update_git_repos.sh deleted file mode 100755 index 742a81b..0000000 --- a/scripts/update_git_repos.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env bash - -# update_git_repos.sh -# Konstantin Pavlov, pavlovconst@gmail.com -# -# Simple script to update all git repos in the current directory -# -# =========================================================================== -# !! CAUTION! All repos will be reset and all uncommitted changes lost !! -# =========================================================================== -# -# see git_pull_subdirs.bat for mode convinient and clever script variant -# - -export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - -eval $(ssh-agent) -ssh-add - -find . -type d -exec echo {} ' ' \; -exec git -C {} reset --hard \; -find . -type d -exec echo {} ' ' \; -exec git -C {} pull --recurse-submodules --all \;