$10 GRAYBYTE WORDPRESS FILE MANAGER $38

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 147.79.69.233 | ADMIN IP 216.73.216.143
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/libexec/mc/extfs.d/

HOME
Current File : /usr/libexec/mc/extfs.d//patchsetfs
#!/bin/sh

LANG=C
export LANG
LC_TIME=C
export LC_TIME

# --- GIT -----------------------------------------------------------------------

found_git_dir()
{
    work_dir=$1
    while [ -n "$work_dir" -a "$work_dir" != "/" ]; do
        [ -d "${work_dir}/.git" ] && {
            echo "${work_dir}/.git/"
            return
        }
        work_dir=`dirname "$work_dir"`
    done
    echo ''
}

patchsetfs_list_git()
{
    WORK_DIR=$1; shift
    fname=$1; shift
    USER=$1; shift
    DATE=$1; shift

    GIT_DIR=`found_git_dir "$WORK_DIR"`
    [ -z "$GIT_DIR" ] && GIT_DIR=$WORK_DIR
    curr_year=`date +"%Y"`

    git --git-dir="$GIT_DIR" log --abbrev=7 --pretty="format:%at %h %an" -- "$fname" | while read TIMESTAMP chset author
    do
        year=`date -d @"$TIMESTAMP" +"%Y"`
        [ "$year" = "$curr_year" ] && {
            DATE=`date -d @"$TIMESTAMP" +"%b %d %H:%M"`
        } || {
            DATE=`date -d @"$TIMESTAMP" +"%b %d %Y"`
        }
        NAME="$chset $author"
        echo "-rw-rw-rw-   1 $USER    0 0 $DATE  $NAME.diff"
    done
}

patchsetfs_copyout_git()
{
    WORK_DIR=$1; shift
    fname=$1; shift
    orig_fname=$1;shift
    output_fname=$1;shift

    chset=`echo "$orig_fname"| cut -f 1 -d " "`

    GIT_DIR=`found_git_dir "$WORK_DIR"`
    [ -z "$GIT_DIR" ] && GIT_DIR=$WORK_DIR

    git  --git-dir="$GIT_DIR" show "$chset" -- "$fname" > "$output_fname"
}

# --- COMMON --------------------------------------------------------------------

patchsetfs_list()
{
    VCS_type=$1; shift
    WORK_DIR=$1; shift
    fname=$1; shift

    DATE=`date +"%b %d %H:%M"`
    USER=`whoami`

    case "$VCS_type" in
        git) patchsetfs_list_git "$WORK_DIR" "$fname" "$USER" "$DATE" ;;
    esac
}

patchsetfs_copyout()
{
    VCS_type=$1; shift
    WORK_DIR=$1; shift
    fname=$1; shift

    case "$VCS_type" in
        git) patchsetfs_copyout_git "$WORK_DIR" "$fname" "$@" ;;
    esac

}

# --- MAIN ----------------------------------------------------------------------

command=$1; shift
tmp_file=$1; shift

WORK_DIR=`head -n1 $tmp_file`
fname=`tail -n2 $tmp_file | head -n1`
VCS_type=`tail -n1 $tmp_file`

case "$command" in
  list) patchsetfs_list "$VCS_type" "$WORK_DIR" "$fname" ;;
  copyout) patchsetfs_copyout "$VCS_type" "$WORK_DIR" "$fname" "$@" ;;
  *) exit 1 ;;
esac
exit 0

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.20 PM
root / root
0755
README
7.287 KB
4 Mar 2017 5.26 PM
root / root
0644
README.extfs
1.107 KB
24 Feb 2017 8.25 PM
root / root
0644
a+
3.131 KB
18 Oct 2019 8.37 PM
root / root
0755
apt+
9.498 KB
18 Oct 2019 8.37 PM
root / root
0755
audio
1.289 KB
18 Oct 2019 8.37 PM
root / root
0755
bpp
1.179 KB
24 Feb 2017 8.25 PM
root / root
0755
changesetfs
2.502 KB
24 Feb 2017 8.25 PM
root / root
0755
deb
5.336 KB
18 Oct 2019 8.37 PM
root / root
0755
deba
3.002 KB
18 Oct 2019 8.37 PM
root / root
0755
debd
10.257 KB
18 Oct 2019 8.37 PM
root / root
0755
dpkg+
8.787 KB
18 Oct 2019 8.37 PM
root / root
0755
gitfs+
0.764 KB
24 Feb 2017 8.25 PM
root / root
0755
hp48+
3.575 KB
18 Oct 2019 8.37 PM
root / root
0755
iso9660
5.646 KB
18 Oct 2019 8.37 PM
root / root
0755
lslR
1.377 KB
18 Oct 2019 8.37 PM
root / root
0755
mailfs
5.586 KB
18 Oct 2019 8.37 PM
root / root
0755
patchfs
10.885 KB
18 Oct 2019 8.37 PM
root / root
0755
patchsetfs
2.256 KB
24 Feb 2017 8.25 PM
root / root
0755
rpm
13.251 KB
4 Mar 2017 5.26 PM
root / root
0755
rpms+
1.474 KB
18 Oct 2019 8.37 PM
root / root
0755
trpm
7.652 KB
24 Feb 2017 8.25 PM
root / root
0755
u7z
4.71 KB
4 Mar 2017 5.26 PM
root / root
0755
uace
1.473 KB
18 Oct 2019 8.37 PM
root / root
0755
ualz
1.25 KB
18 Oct 2019 8.37 PM
root / root
0755
uar
1.292 KB
18 Oct 2019 8.37 PM
root / root
0755
uarc
1.785 KB
18 Oct 2019 8.37 PM
root / root
0755
uarj
1.616 KB
18 Oct 2019 8.37 PM
root / root
0755
ucab
0.717 KB
18 Oct 2019 8.37 PM
root / root
0755
uha
0.946 KB
18 Oct 2019 8.37 PM
root / root
0755
ulha
3.779 KB
18 Oct 2019 8.37 PM
root / root
0755
ulib
2.759 KB
18 Oct 2019 8.37 PM
root / root
0755
urar
4.369 KB
18 Oct 2019 8.37 PM
root / root
0755
uzip
14.903 KB
18 Oct 2019 8.37 PM
root / root
0755
uzoo
1.563 KB
18 Oct 2019 8.37 PM
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF