migrate/migrate.sh

13 lines
749 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2022-02-26 00:29:43 +00:00
#program should retrieve a list of installed packages and cloned repos, add them to a list and allow the syncing of them between installs, will be for arch so pacman package manager to install packages. Of course git will be used for the syncing of repos
#thanks to SBRL for this handy git repo url finder
#find /home/ctome/git/ -mount -type d -name '.git' -print0 | xargs -0 -I {} bash -c 'dirgit="{}"; dir="$(dirname "${dirgit}")"; cd "${dir}" && echo -e "$(git remote -v | tr " " "\t" | cut -f 2 | head -n1)";' |grep .com > repos.txt && mkdir -p repos;
2022-02-26 00:29:43 +00:00
2022-05-04 02:52:38 +01:00
# cd repos && cat ../repos.txt |xargs -0 git clone;
# the newer way of cloning repos that you own
gh repo list --limit 100 |awk '{print $1}' | xargs -L1 gh repo clone