File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ echo_blank(){ yes " " 2> /dev/null | head -n "${1}" | tr -d "\n"; }
7777# cpコマンドのラッパー
7878_cp (){ cp -af --no-preserve=ownership,mode -- " ${@ } " ; }
7979
80+ # gitコマンドのラッパー
81+ # https://stackoverflow.com/questions/71901632/fatal-unsafe-repository-home-repon-is-owned-by-someone-else
82+ # https://qiita.com/megane42/items/5375b54ea3570506e296
83+ git (){
84+ command git config --global safe.directory " $script_path "
85+ command git " $@ "
86+ command git config --global --unset safe.directory
87+ }
88+
89+
8090_usage () {
8191 cat " ${script_path} /docs/build.sh/help.1"
8292 local blank=" 29" _arch _dirname _type _output _first
@@ -1155,7 +1165,8 @@ else
11551165fi
11561166
11571167# Set vars
1158- build_dir=" ${work_dir} /build/${arch} " cache_dir=" ${work_dir} /cache/${arch} " airootfs_dir=" ${build_dir} /airootfs" isofs_dir=" ${build_dir} /iso" lockfile_dir=" ${build_dir} /lockfile" gitrev=" $( cd " ${script_path} " ; git rev-parse --short HEAD) " preset_dir=" ${script_path} /presets"
1168+ build_dir=" ${work_dir} /build/${arch} " cache_dir=" ${work_dir} /cache/${arch} " airootfs_dir=" ${build_dir} /airootfs" isofs_dir=" ${build_dir} /iso" lockfile_dir=" ${build_dir} /lockfile" preset_dir=" ${script_path} /presets"
1169+ gitrev=" $( cd " ${script_path} " ; git rev-parse --short HEAD) "
11591170
11601171# Create dir
11611172for _dir in build_dir cache_dir airootfs_dir isofs_dir lockfile_dir out_dir; do
You can’t perform that action at this time.
0 commit comments