repo.or.cz
/
xuni.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
=== Overview ===
[xuni.git]
/
chwinmod1.sh
blob
b4db45fc1bd6c6d81c13ca82be2c30d41818cc6f
1
#!/bin/sh
2
3
file
=
"
$1
"
4
5
if
[
-f
"
$file
"
];
then
6
if
[
-n
"$(echo
$file
| file -f - | grep executable)"
];
then
7
echo
$file
:
executable
8
chmod
755
"
$file
"
9
else
10
echo
$file
:
normal
11
chmod
644
"
$file
"
12
fi
13
elif
[
-d
"
$file
"
];
then
14
echo
$file
:
directory
15
chmod
755
"
$file
"
16
else
17
echo
$file
:
ignored
18
fi