Skip to content

Instantly share code, notes, and snippets.

View dogukanarat's full-sized avatar
🎲
Programming

Doğukan Arat dogukanarat

🎲
Programming
View GitHub Profile
@dogukanarat
dogukanarat / generateSubmodules.sh
Created November 15, 2024 11:18
Script file to extract all git submodule and create text file that contains git command to initialize them
#!/bin/sh
set -e
output_file="submodule_add_commands.sh"
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key local_path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
# This script generates the config header file from .config
import os
import sys
import re
import argparse
def main():
parser = argparse.ArgumentParser(description='Generate config header file from .config')
parser.add_argument('config_file', help='Path to .config file')