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

Re: URL to source file



> It is still in some interface but good enough for a reference.
>
> Good enough for government work!
>
> So it is: https://sources.debian.org/src/ + package name +
> package version + file name

$ file-url units definitions.units # https://sources.debian.org/src/units/2.21-1/definitions.units

#! /bin/zsh

file-url () {
    local debian=https://sources.debian.org/src
    local pack=$1
    local ver=$(aptitude show units | grep '^Version: ' | awk '{print $2}')
    local file=$2
    local url=$debian/$pack/$ver/$file
    echo $url
} # [1]

[1] https://dataswamp.org/~incal/conf/.zsh/apt lines 168-175

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


Reply to: