Re: Commit templates are not readable after 'make install'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

>> diff --git c/templates/Makefile w/templates/Makefile
>> index 0722a92..a12c6e2 100644
>> --- c/templates/Makefile
>> +++ w/templates/Makefile
>> @@ -31,9 +31,11 @@ boilerplates.made : $(bpsrc)
>>  		dir=`expr "$$dst" : '\(.*\)/'` && \
>>  		mkdir -p blt/$$dir && \
>>  		case "$$boilerplate" in \
>> -		*--) ;; \
>> -		*) cp -p $$boilerplate blt/$$dst ;; \
>> -		esac || exit; \
>> +		*--) continue;; \
>> +		esac && \
>> +		cp $$boilerplate blt/$$dst && \
>> +		if test -x "blt/$$dst"; then rx=rx; else rx=r; fi && \
>> +		chmod a+$$rx "blt/$$dst" || exit; \
>>  	done && \
>>  	date >$@
>
> Since only hooks need to be executable, how about this instead:

Hmm. I tried to avoid hardcoding "it so happens that currently the only
executables are hooks".

> diff --git a/templates/Makefile b/templates/Makefile
> index 0722a92..80cd000 100644
> --- a/templates/Makefile
> +++ b/templates/Makefile
> @@ -32,7 +32,12 @@ boilerplates.made : $(bpsrc)
>  		mkdir -p blt/$$dir && \
>  		case "$$boilerplate" in \
>  		*--) ;; \
> -		*) cp -p $$boilerplate blt/$$dst ;; \
> +		hooks--*) \
> +			cp -p "$$boilerplate" "blt/$$dst" && \
> +			chmod a+rx "blt/$$dst";; \
> +		*) \
> +			cp -p "$$boilerplate" "blt/$$dst" && \
> +			chmod a+r "blt/$$dst";; \
>  		esac || exit; \
>  	done && \
>  	date >$@
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux